From 24cbdd4943af5fa9cad7a0f6f5219555cde9f157 Mon Sep 17 00:00:00 2001 From: Rich Ercolani Date: Wed, 21 Jul 2021 16:10:38 -0400 Subject: [PATCH] Make get_key_material_file fail more verbosely It turns out, there are a lot of possible reasons for fopen to fail. Let's share which reason we failed for today. Signed-off-by: Rich Ercolani --- lib/libzfs/libzfs_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/libzfs_crypto.c b/lib/libzfs/libzfs_crypto.c index c3cded24f6ba..644dd26859f1 100644 --- a/lib/libzfs/libzfs_crypto.c +++ b/lib/libzfs/libzfs_crypto.c @@ -486,7 +486,7 @@ get_key_material_file(libzfs_handle_t *hdl, const char *uri, ret = errno; errno = 0; zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "Failed to open key material file")); + "Failed to open key material file: %s"), strerror(ret)); return (ret); }