From 74df0c5e251a920a1966a011c16f960cd7ba562e Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Tue, 10 Apr 2018 00:11:17 -0400 Subject: [PATCH] Correct swapped keylocation error messages This patch corrects a small issue where two error messages in the code that checks for invalid keylocations were swapped. Reviewed by: Matt Ahrens Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Signed-off-by: Tom Caputi Closes #7418 --- lib/libzfs/libzfs_dataset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 8ec5b7af4..1a8c294d2 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -1418,16 +1418,16 @@ badlabel: if (crypt == ZIO_CRYPT_OFF && strcmp(strval, "none") != 0) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "keylocation must not be 'none' " - "for encrypted datasets")); + "keylocation must be 'none' " + "for unencrypted datasets")); (void) zfs_error(hdl, EZFS_BADPROP, errbuf); goto error; } else if (crypt != ZIO_CRYPT_OFF && strcmp(strval, "none") == 0) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "keylocation must be 'none' " - "for unencrypted datasets")); + "keylocation must not be 'none' " + "for encrypted datasets")); (void) zfs_error(hdl, EZFS_BADPROP, errbuf); goto error;