Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Feb 2023 20:07:37 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: 81d71f94cabc - main - kboot: Fix hostdisk fmtdev
Message-ID:  <202302022007.312K7bdw036101@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=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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302022007.312K7bdw036101>