diff options
author | Warner Losh <imp@FreeBSD.org> | 2022-08-11 15:07:13 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2023-01-24 21:49:30 +0000 |
commit | ec6d9023e56aebe0c3fe8fb7d15512097a20df8a (patch) | |
tree | 8c2b4d824e0eaad53a1f37ed395790e72a4872c8 | |
parent | fe9661bce6a4dcd9e99f13d28c973beba47efdee (diff) | |
download | src-ec6d9023e56aebe0c3fe8fb7d15512097a20df8a.tar.gz src-ec6d9023e56aebe0c3fe8fb7d15512097a20df8a.zip |
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
[ minor tweaks due to earlier UFS MFC ]
(cherry picked from commit 0b3a4a588fb6b30d923686828dab4685b94ec1ea)
-rw-r--r-- | stand/libsa/ufs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/stand/libsa/ufs.c b/stand/libsa/ufs.c index fa3820617860..8385a1a3419d 100644 --- a/stand/libsa/ufs.c +++ b/stand/libsa/ufs.c @@ -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); @@ -525,7 +524,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) @@ -744,7 +743,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; |