summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorChristian Schwarz <[email protected]>2019-11-23 16:31:38 +0100
committerBrian Behlendorf <[email protected]>2020-01-23 09:33:10 -0800
commit7b53e2e5a9c771869e5629e9cca04f2014e7413b (patch)
tree88e760b6d1aaecbdd9ec04cc62352dd43198c174 /cmd
parent3d91490f7c69986132f374d016de3753ea790567 (diff)
cmd/zfs: send: meaningful error message for incorrect redaction bookmark
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matt Ahrens <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes #9867
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zfs/zfs_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index 2bf2b6cf9..a6e75e0ba 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -4403,6 +4403,12 @@ zfs_do_send(int argc, char **argv)
"do a redacted send to a filesystem.\n"));
return (1);
}
+ if (strchr(redactbook, '#') != NULL) {
+ (void) fprintf(stderr, gettext("Error: "
+ "redaction bookmark argument must "
+ "not contain '#'\n"));
+ return (1);
+ }
}
zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_DATASET);