stand: Use devformat instead of disk_devfmt
Use devformat instead of disk_devfmt. This allows us to avoid knowing the details of the device that's underneath us. Remove disk.h include and the -I${LDRSRC} from the build of ufs.c since they are no longer needed. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D35922
This commit is contained in:
parent
ec9f3e776f
commit
0b3a4a588f
@ -170,7 +170,6 @@ SRCS+= time.c
|
||||
.PATH: ${SRCTOP}/sys/ufs/ffs
|
||||
SRCS+=ffs_subr.c ffs_tables.c
|
||||
|
||||
CFLAGS.ufs.c+= -I${LDRSRC}
|
||||
CFLAGS.gzipfs.c+= ${ZLIB_CFLAGS}
|
||||
CFLAGS.pkgfs.c+= ${ZLIB_CFLAGS}
|
||||
CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 -DBZ_NO_STDIO -DBZ_NO_COMPRESS
|
||||
|
@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ufs/ufs/dir.h>
|
||||
#include <ufs/ffs/fs.h>
|
||||
#include "stand.h"
|
||||
#include "disk.h"
|
||||
#include "string.h"
|
||||
|
||||
static int ufs_open(const char *path, struct open_file *f);
|
||||
@ -520,7 +519,7 @@ ufs_open(const char *upath, struct open_file *f)
|
||||
return (errno);
|
||||
f->f_fsdata = (void *)fp;
|
||||
|
||||
dev = disk_fmtdev(f->f_devdata);
|
||||
dev = devformat((struct devdesc *)f->f_devdata);
|
||||
/* Is this device mounted? */
|
||||
STAILQ_FOREACH(mnt, &mnt_list, um_link) {
|
||||
if (strcmp(dev, mnt->um_dev) == 0)
|
||||
@ -739,7 +738,7 @@ ufs_close(struct open_file *f)
|
||||
}
|
||||
free(fp->f_buf);
|
||||
|
||||
dev = disk_fmtdev(f->f_devdata);
|
||||
dev = devformat((struct devdesc *)f->f_devdata);
|
||||
STAILQ_FOREACH(mnt, &mnt_list, um_link) {
|
||||
if (strcmp(dev, mnt->um_dev) == 0)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user