MFC r289531: 5847 libzfs_diff should check zfs_prop_get() return
Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Albert Lee <trisk@omniti.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Alexander Eremin <a.eremin@nexenta.com> illumos/illumos-gate@8430278980
This commit is contained in:
parent
b470ddeee2
commit
503dafdd83
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -624,9 +625,12 @@ get_snapshot_names(differ_info_t *di, const char *fromsnap,
|
|||||||
|
|
||||||
zhp = zfs_open(hdl, di->ds, ZFS_TYPE_FILESYSTEM);
|
zhp = zfs_open(hdl, di->ds, ZFS_TYPE_FILESYSTEM);
|
||||||
while (zhp != NULL) {
|
while (zhp != NULL) {
|
||||||
(void) zfs_prop_get(zhp, ZFS_PROP_ORIGIN,
|
if (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, origin,
|
||||||
origin, sizeof (origin), &src, NULL, 0, B_FALSE);
|
sizeof (origin), &src, NULL, 0, B_FALSE) != 0) {
|
||||||
|
(void) zfs_close(zhp);
|
||||||
|
zhp = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (strncmp(origin, fromsnap, fsnlen) == 0)
|
if (strncmp(origin, fromsnap, fsnlen) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user