diff options
author | lulf <lulf@FreeBSD.org> | 2007-11-05 23:15:03 +0000 |
---|---|---|
committer | lulf <lulf@FreeBSD.org> | 2007-11-05 23:15:03 +0000 |
commit | c55024b789979f33c87d68c8ec5b9f260f035dc7 (patch) | |
tree | 639546011208282d6741e048c1d3015db81b7061 /usr.bin/fstat/fstat.c | |
parent | db5f004bc952a9ca2b8616d36d81399b818a7f5d (diff) | |
download | FreeBSD-src-c55024b789979f33c87d68c8ec5b9f260f035dc7.zip FreeBSD-src-c55024b789979f33c87d68c8ec5b9f260f035dc7.tar.gz |
- Add ZFS-support to fstat(1). This allows ZFS-filsystems to be including in
the open file-listing. It is added as a separate source file, so it can
respect WITH_/WITHOUT_CDDL as compile-flags.
- The warnlevel of the Makefile was decreased to quell solaris #pragma
warnings.
- Expect that fstat(1) doesn't work with kernel compiled with
DEBUG_VFS_LOCKS/DEBUG_LOCKS for now.
Approved by: pjd (mentor)
Diffstat (limited to 'usr.bin/fstat/fstat.c')
-rw-r--r-- | usr.bin/fstat/fstat.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 26c9ad4..bc6467a1 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -524,6 +524,11 @@ vtrans(struct vnode *vp, int i, int flag) } else if (!strcmp("isofs", tagstr)) { if (!isofs_filestat(&vn, &fst)) badtype = "error"; +#ifdef ZFS + } else if (!strcmp("zfs", tagstr)) { + if (!zfs_filestat(&vn, &fst)) + badtype = "error"; +#endif } else { static char unknown[32]; snprintf(unknown, sizeof unknown, "?(%s)", tagstr); @@ -938,6 +943,20 @@ getfname(const char *filename) return(1); } +#ifdef ZFS +void * +getvnodedata(struct vnode *vp) +{ + return (vp->v_data); +} + +struct mount * +getvnodemount(struct vnode *vp) +{ + return (vp->v_mount); +} +#endif + void usage(void) { |