git: ec6d9023e56a - stable/13 - stand: Use devformat instead of disk_devfmt
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:11:59 UTC
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=ec6d9023e56aebe0c3fe8fb7d15512097a20df8a
commit ec6d9023e56aebe0c3fe8fb7d15512097a20df8a
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-08-11 15:07:13 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:30 +0000
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)
---
stand/libsa/ufs.c | 5 ++---
1 file 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;