Date: Sat, 8 Oct 2022 05:51:08 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 6700f34d126e - main - kboot: hostdisk add to lsdev output Message-ID: <202210080551.2985p8GS028555@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6700f34d126eb4892e24f4c7758e9f570de2fb4e commit 6700f34d126eb4892e24f4c7758e9f570de2fb4e Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-10-08 05:46:20 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-10-08 05:46:20 +0000 kboot: hostdisk add to lsdev output Not entirely sure what to do here, so just list that we're here. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D36606 --- stand/kboot/hostdisk.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c index 00f133274f10..487f24fde821 100644 --- a/stand/kboot/hostdisk.c +++ b/stand/kboot/hostdisk.c @@ -127,6 +127,12 @@ hostdisk_ioctl(struct open_file *f, u_long cmd, void *data) static int hostdisk_print(int verbose) { - return (0); -} + char line[80]; + printf("%s devices:", hostdisk.dv_name); + if (pager_output("\n") != 0) + return (1); + + snprintf(line, sizeof(line), " /dev%d: Host disk\n", 0); + return (pager_output(line)); +}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210080551.2985p8GS028555>