* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright (c) 2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
*/
}
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:
return (ENOSYS);
#endif /* HAVE_IDMAP */
} else {
-#ifdef HAVE_IDMAP
/* It's a user/group ID (eg "12345"). */
uid_t id;
- idmap_rid_t rid;
- char *mapdomain;
char *end;
-
id = strtoul(cp, &end, 10);
if (*end != '\0')
return (EINVAL);
if (id > MAXUID) {
+#ifdef HAVE_IDMAP
/* It's an ephemeral ID. */
+ idmap_rid_t rid;
+ char *mapdomain;
+
if (idmap_id_to_numeric_domain_rid(id, isuser,
&mapdomain, &rid) != 0)
return (ENOENT);
(void) strlcpy(domain, mapdomain, domainlen);
*ridp = rid;
+#else
+ return (ENOSYS);
+#endif /* HAVE_IDMAP */
} else {
*ridp = id;
}
-#else
- return (ENOSYS);
-#endif /* HAVE_IDMAP */
}
return (0);
zhp->zfs_type == ZFS_TYPE_VOLUME);
/*
- * Destroy all recent snapshots and its dependends.
+ * Destroy all recent snapshots and their dependents.
*/
cb.cb_force = force;
cb.cb_target = snap->zfs_name;
*/
return (0);
+ case ENODEV:
+ /*
+ * snapdev set to hidden :
+ * device creation was not permitted (see zvol.c)
+ * ignore error quietly
+ */
+ return (0);
+
case ENOENT:
/*
* Dataset does not exist in the kernel. If we