From 7b53e2e5a9c771869e5629e9cca04f2014e7413b Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 23 Nov 2019 16:31:38 +0100 Subject: cmd/zfs: send: meaningful error message for incorrect redaction bookmark Reviewed-by: Brian Behlendorf Reviewed-by: Matt Ahrens Signed-off-by: Christian Schwarz Closes #9867 --- cmd/zfs/zfs_main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd') 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); -- cgit v1.2.3