summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2019-07-02 20:30:00 -0400
committerTony Hutter <[email protected]>2019-09-25 11:27:48 -0700
commit9e09826b33092bfe41dce14e098b2d2f4931da2f (patch)
treebb3d0ee0e115c5e8d9affee6f9636d8e379de49a /lib
parent093bb6446120c50a7109ed7e7a0f2e76730b3160 (diff)
Fix error text for EINVAL in zfs_receive_one()
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: loli10K <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #8977
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 052b96b9b..0d3853e0a 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -4418,14 +4418,15 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
*cp = '@';
break;
case EINVAL:
- if (flags->resumable)
+ if (flags->resumable) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"kernel modules must be upgraded to "
"receive this stream."));
- if (embedded && !raw)
+ } else if (embedded && !raw) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"incompatible embedded data stream "
"feature with encrypted receive."));
+ }
(void) zfs_error(hdl, EZFS_BADSTREAM, errbuf);
break;
case ECKSUM: