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
This commit is contained in:
Warner Losh 2022-08-11 09:06:53 -06:00
parent ad759c7352
commit ec9f3e776f
2 changed files with 1 additions and 3 deletions

View File

@ -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}

View File

@ -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;