git: 81d71f94cabc - main - kboot: Fix hostdisk fmtdev
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Feb 2023 20:07:37 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=81d71f94cabcef8f88637f426bcd8379f9448fd9
commit 81d71f94cabcef8f88637f426bcd8379f9448fd9
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-02-02 20:03:39 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-02-02 20:04:06 +0000
kboot: Fix hostdisk fmtdev
The device name was totally wrong. It should be "/dev/mumble:" not just
"mumble".
Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D38318
---
stand/kboot/hostdisk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c
index fab4ee04bb6b..3c924293223a 100644
--- a/stand/kboot/hostdisk.c
+++ b/stand/kboot/hostdisk.c
@@ -429,8 +429,10 @@ done:
static char *
hostdisk_fmtdev(struct devdesc *vdev)
{
+ static char name[DEV_DEVLEN];
- return ((char *)hd_name(dev2hd(vdev)));
+ snprintf(name, sizeof(name), "%s:", dev2hd(vdev)->hd_dev);
+ return (name);
}
static bool