aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-02-02 20:03:39 +0000
committerWarner Losh <imp@FreeBSD.org>2023-02-02 20:04:06 +0000
commit81d71f94cabcef8f88637f426bcd8379f9448fd9 (patch)
tree98159aeeaba809f1d077a1802bed392ae9bf9a0f
parent9fb276ea800171b2065994b532931eb684777120 (diff)
downloadsrc-81d71f94cabcef8f88637f426bcd8379f9448fd9.tar.gz
src-81d71f94cabcef8f88637f426bcd8379f9448fd9.zip
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
-rw-r--r--stand/kboot/hostdisk.c4
1 files changed, 3 insertions, 1 deletions
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