git: 654b7837a6a0 - main - stand: For zfs, set dv_fmtdev to zfs_fmtdev
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Aug 2022 16:27:45 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=654b7837a6a08ec5b51635badd14794754fab7c5 commit 654b7837a6a08ec5b51635badd14794754fab7c5 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-08-11 15:07:26 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-08-11 16:27:16 +0000 stand: For zfs, set dv_fmtdev to zfs_fmtdev Add a generic way to get the string representation of a zfs device / mount. Sponsored by: Netflix Reviewed by: tsoome (prior version) Differential Revision: https://reviews.freebsd.org/D35923 --- stand/libsa/zfs/Makefile.inc | 3 ++- stand/libsa/zfs/zfs.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index b85433f4873f..b168451e24d0 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -60,7 +60,8 @@ CFLAGS_EARLY.zfs.c += ${ZFS_EARLY} # zfs.c is special: we need to define HAS_ZSTD_ZFS to get zfssubr.c to initialize zstd # properly. We need to have the cddl boot compat directory in the include path for zfssubr.c # to be found, and we need a couple of other include paths for skein and lz4. Finally we -# temporarily need LDRSRC to pick up disk.h until that layering violation is corrected. +# temporarily need LDRSRC to pick up part.h until libsa has a way to look into partitions +# or enumerate them... # CFLAGS.zfs.c+= -DHAS_ZSTD_ZFS \ -I${SYSDIR}/cddl/boot/zfs \ diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 5392bcaa4fb1..0ac67d750fcd 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -1634,6 +1634,7 @@ struct devsw zfs_dev = { .dv_ioctl = noioctl, .dv_print = zfs_dev_print, .dv_cleanup = nullsys, + .dv_fmtdev = zfs_fmtdev, }; int