summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2017-05-05 21:57:26 +0000
committerasomers <asomers@FreeBSD.org>2017-05-05 21:57:26 +0000
commitc0e994e0200f1687cadd48eb0ac61ab5be04e6fd (patch)
tree867066f3a8780c80ab6dc75b47ed9b940654d114 /cddl/contrib/opensolaris
parent29a843a8a2e5e9eaf7dbbee4927bdf924dc25bfb (diff)
downloadFreeBSD-src-c0e994e0200f1687cadd48eb0ac61ab5be04e6fd.zip
FreeBSD-src-c0e994e0200f1687cadd48eb0ac61ab5be04e6fd.tar.gz
MFC r316856:
MFV 316855 7900 zdb shouldn't print the path of a znode at verbosity < 5 Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Alan Somers <asomers@freebsd.org> illumos/illumos-gate@e548d2fa41d1baa06662ed9abbb8bcec86e27dd9 https://www.illumos.org/issues/7900 Sponsored by: Spectra Logic Corp
Diffstat (limited to 'cddl/contrib/opensolaris')
-rw-r--r--cddl/contrib/opensolaris/cmd/zdb/zdb.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
index d44fe37..482e560 100644
--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c
+++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
@@ -1718,23 +1718,19 @@ dump_znode(objset_t *os, uint64_t object, void *data, size_t size)
return;
}
- error = zfs_obj_to_path(os, object, path, sizeof (path));
- if (error != 0) {
- (void) snprintf(path, sizeof (path), "\?\?\?<object#%llu>",
- (u_longlong_t)object);
- }
- if (dump_opt['d'] < 3) {
- (void) printf("\t%s\n", path);
- (void) sa_handle_destroy(hdl);
- return;
- }
-
z_crtime = (time_t)crtm[0];
z_atime = (time_t)acctm[0];
z_mtime = (time_t)modtm[0];
z_ctime = (time_t)chgtm[0];
- (void) printf("\tpath %s\n", path);
+ if (dump_opt['d'] > 4) {
+ error = zfs_obj_to_path(os, object, path, sizeof (path));
+ if (error != 0) {
+ (void) snprintf(path, sizeof (path),
+ "\?\?\?<object#%llu>", (u_longlong_t)object);
+ }
+ (void) printf("\tpath %s\n", path);
+ }
dump_uidgid(os, uid, gid);
(void) printf("\tatime %s", ctime(&z_atime));
(void) printf("\tmtime %s", ctime(&z_mtime));
OpenPOWER on IntegriCloud