aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs
diff options
context:
space:
mode:
authorloli10K <[email protected]>2018-12-05 18:33:52 +0100
committerBrian Behlendorf <[email protected]>2018-12-05 09:33:52 -0800
commitb53cb02d925258ada06282d7dc4223a251edb5cb (patch)
tree1d96e3cd60905d1e21fde66ad2bd482a646a87b1 /lib/libzfs
parent2aa398f3aa907b71e1f827aec8e59d5dd081cb6f (diff)
Fix 'zfs receive -F' message when destination has snapshots
When receiving a send stream with forced rollback on a dataset with snapshots zfs suggests said snapshots must be removed to successfully receive the stream; however the message is misleading because it prints the dataset name instead of one of its snapshots. $ sudo zfs snap pp/recvfs@snap-orig $ sudo zfs recv -F pp/recvfs < sendstream cannot receive new filesystem stream: destination has snapshots (eg. pp/recvfs) must destroy them to overwrite it This change simply restores the snapshot name in the error message. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #8167
Diffstat (limited to 'lib/libzfs')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 710bc1912..a05ccbe30 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -3930,7 +3930,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"destination has snapshots (eg. %s)\n"
"must destroy them to overwrite it"),
- name);
+ zc.zc_name);
err = zfs_error(hdl, EZFS_EXISTS, errbuf);
goto out;
}