summaryrefslogtreecommitdiffstats
path: root/cddl/contrib
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2012-06-07 08:32:53 +0000
committermm <mm@FreeBSD.org>2012-06-07 08:32:53 +0000
commit7e5eee48820fc16893328170d307c941be971c26 (patch)
treee76c26d03044903fa186fb2f705e0095d11b0f9c /cddl/contrib
parent8aaec4109312dd6d582cbed8b3d8730cce292d17 (diff)
downloadFreeBSD-src-7e5eee48820fc16893328170d307c941be971c26.zip
FreeBSD-src-7e5eee48820fc16893328170d307c941be971c26.tar.gz
Import Illumos revision 13715:351036203e4b
2803 zfs get guid pretty-prints the output References: https://www.illumos.org/issues/2803 Obtained from: illumos (issue #2803) MFC after: 3 days
Diffstat (limited to 'cddl/contrib')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
index c01cffe..fcd43a0 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
@@ -23,6 +23,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2010 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright (c) 2011-2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
* All rights reserved.
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
@@ -2321,6 +2322,17 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
}
break;
+ case ZFS_PROP_GUID:
+ /*
+ * GUIDs are stored as numbers, but they are identifiers.
+ * We don't want them to be pretty printed, because pretty
+ * printing mangles the ID into a truncated and useless value.
+ */
+ if (get_numeric_property(zhp, prop, src, &source, &val) != 0)
+ return (-1);
+ (void) snprintf(propbuf, proplen, "%llu", (u_longlong_t)val);
+ break;
+
default:
switch (zfs_prop_get_type(prop)) {
case PROP_TYPE_NUMBER:
OpenPOWER on IntegriCloud