recv: don't complain about 'no-op' -x options.
When a recursive send is performed that contains volumes (to backup a system that has VMs run from the main zpool, for example), the destination receive run with '-x mountpoint' will complain with Warning: backup/path/to/volume: property 'mountpoint' does not apply to datasets of this type. This change disables these warnings for mis-matched (could not be in send stream) options.
This commit is contained in:
parent
ba92d00cc7
commit
95f7107d15
|
@ -4218,16 +4218,14 @@ zfs_setup_cmdline_props(libzfs_handle_t *hdl, zfs_type_t type,
|
||||||
*/
|
*/
|
||||||
if (!zfs_prop_valid_for_type(prop, type, B_FALSE) &&
|
if (!zfs_prop_valid_for_type(prop, type, B_FALSE) &&
|
||||||
!zfs_prop_user(name)) {
|
!zfs_prop_user(name)) {
|
||||||
if (type == ZFS_TYPE_VOLUME &&
|
/*
|
||||||
strncmp("mountpoint", name, 10) == 0) {
|
* These are non-user properties that are not
|
||||||
// Don't complain about '-x mountpoint'
|
* supported for this particular type of
|
||||||
// applied to a volume.
|
* destination. These could not have been set
|
||||||
continue;
|
* on the source, so there is no reason to
|
||||||
}
|
* complain about eliding them (-x) during the
|
||||||
(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
|
* receive.
|
||||||
"Warning: %s: property '%s' does not "
|
*/
|
||||||
"apply to datasets of this type\n"),
|
|
||||||
fsname, name);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue