]> granicus.if.org Git - zfs/commitdiff
Correct swapped keylocation error messages
authorTom Caputi <tcaputi@datto.com>
Tue, 10 Apr 2018 04:11:17 +0000 (00:11 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 10 Apr 2018 04:11:17 +0000 (21:11 -0700)
This patch corrects a small issue where two error messages
in the code that checks for invalid keylocations were
swapped.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7418

lib/libzfs/libzfs_dataset.c

index 8ec5b7af4b4a771d50af3e0f2479c4a2bfdd5d53..1a8c294d2857f780cde39bf89bbf8e35c6c9c3ad 100644 (file)
@@ -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;