git: ec9f3e776f39 - main - stand: Use devformat rather than disk_devfmt

From: Warner Losh <imp_at_FreeBSD.org>
Date: Thu, 11 Aug 2022 16:27:43 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=ec9f3e776f39286ccec9915f38cca9729e6f9241

commit ec9f3e776f39286ccec9915f38cca9729e6f9241
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-08-11 15:06:53 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-08-11 16:27:16 +0000

    stand: Use devformat rather than disk_devfmt
    
    Fix layering violation and use devformat to get the string
    representation of the device to see if we're mounted yet or not. Remove
    added include to pickup disk.h.
    
    Sponsored by:           Netflix
    Reviewed by:            tsoome (prior version)
    Differential Revision:  https://reviews.freebsd.org/D35919
---
 stand/libsa/Makefile | 1 -
 stand/libsa/dosfs.c  | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
index de25a596d1ec..c2372e192b38 100644
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -170,7 +170,6 @@ SRCS+=	time.c
 .PATH: ${SRCTOP}/sys/ufs/ffs
 SRCS+=ffs_subr.c ffs_tables.c
 
-CFLAGS.dosfs.c+= -I${LDRSRC}
 CFLAGS.ufs.c+= -I${LDRSRC}
 CFLAGS.gzipfs.c+= ${ZLIB_CFLAGS}
 CFLAGS.pkgfs.c+= ${ZLIB_CFLAGS}
diff --git a/stand/libsa/dosfs.c b/stand/libsa/dosfs.c
index 452a79ae12dc..09f09dc66809 100644
--- a/stand/libsa/dosfs.c
+++ b/stand/libsa/dosfs.c
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
 #include <stddef.h>
 
 #include "stand.h"
-#include "disk.h"
 
 #include "dosfs.h"
 
@@ -314,7 +313,7 @@ dos_open(const char *path, struct open_file *fd)
 	u_int size, clus;
 	int err;
 
-	dev = disk_fmtdev(fd->f_devdata);
+	dev = devformat((struct devdesc *)fd->f_devdata);
 	STAILQ_FOREACH(mnt, &mnt_list, dos_link) {
 		if (strcmp(dev, mnt->dos_dev) == 0)
 			break;