diff options
Diffstat (limited to 'usr')
| -rw-r--r-- | usr/src/cmd/zfs/zfs_main.c | 14 | ||||
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_dataset.c | 14 |
2 files changed, 13 insertions, 15 deletions
diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c index 0fba9046bd..4187d8b506 100644 --- a/usr/src/cmd/zfs/zfs_main.c +++ b/usr/src/cmd/zfs/zfs_main.c @@ -1636,9 +1636,19 @@ set_callback(zfs_handle_t *zhp, void *data) } } - if (zfs_prop_set(zhp, cbp->cb_prop, cbp->cb_value) != 0) + if (zfs_prop_set(zhp, cbp->cb_prop, cbp->cb_value) != 0) { + switch (libzfs_errno(g_zfs)) { + case EZFS_MOUNTFAILED: + (void) fprintf(stderr, gettext("property may be set " + "but unable to remount filesystem\n")); + break; + case EZFS_SHAREFAILED: + (void) fprintf(stderr, gettext("property may be set " + "but unable to reshare filesystem\n")); + break; + } return (1); - + } ret = 0; error: return (ret); diff --git a/usr/src/lib/libzfs/common/libzfs_dataset.c b/usr/src/lib/libzfs/common/libzfs_dataset.c index 79252fa94c..9ff3a083be 100644 --- a/usr/src/lib/libzfs/common/libzfs_dataset.c +++ b/usr/src/lib/libzfs/common/libzfs_dataset.c @@ -995,20 +995,8 @@ zfs_prop_inherit(zfs_handle_t *zhp, zfs_prop_t prop) return (zfs_standard_error(hdl, errno, errbuf)); } else { - if ((ret = changelist_postfix(cl)) != 0) { - /* - * If we got an error then warn the user that the - * property was changed but not remounted/reshared - */ - if (ret != 0 && (prop == ZFS_PROP_MOUNTPOINT || - prop == ZFS_PROP_SHARENFS)) { - zfs_error(dgettext(TEXT_DOMAIN, - "property set but unable to %s " - "filesystem"), prop == ZFS_PROP_MOUNTPOINT ? - "remount":"reshare"); - } + if ((ret = changelist_postfix(cl)) != 0) goto error; - } /* * Refresh the statistics so the new property is reflected. |
