]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
cryptodisk: Improve cryptomount -u error message
authorGlenn Washburn <development@efficientek.com>
Thu, 9 Dec 2021 17:14:54 +0000 (11:14 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Dec 2021 01:05:57 +0000 (02:05 +0100)
When a cryptmount is specified with a UUID, but no cryptodisk backends find
a disk with that UUID, return a more detailed message giving telling the
user that they might not have a needed cryptobackend module loaded.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c

index 3a896c6634aead3fb62c8a5be0f40c0542264e11..5a9780b14c8a888313bccdf536d7fb7ebbcd9c88 100644 (file)
@@ -1159,7 +1159,7 @@ grub_cmd_cryptomount (grub_extcmd_context_t ctxt, int argc, char **args)
           */
          grub_error_pop ();
          if (grub_errno == GRUB_ERR_NONE)
-           return grub_error (GRUB_ERR_BAD_ARGUMENT, "no such cryptodisk found");
+           return grub_error (GRUB_ERR_BAD_ARGUMENT, "no such cryptodisk found, perhaps a needed disk or cryptodisk module is not loaded");
        }
       return grub_errno;
     }