cmd/zfs: send: meaningful error message for incorrect redaction bookmark

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Signed-off-by: Christian Schwarz <me@cschwarz.com>
Closes #9867
This commit is contained in:
Christian Schwarz 2019-11-23 16:31:38 +01:00 committed by Brian Behlendorf
parent 3d91490f7c
commit 7b53e2e5a9

View File

@ -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);