summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Ercolani <214141+rincebrain@users.noreply.github.com>2021-08-05 19:48:33 -0400
committerTony Hutter <hutter2@llnl.gov>2021-09-14 14:30:13 -0700
commit23184b172a8bed1c248c8aef3b7e02d5515c88f5 (patch)
treeaed1574a6cfa36f6df67c760a84132040a73e629
parent32a971e7499a5a83ce9921a0f36a3d127b1b57e4 (diff)
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. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12410
-rw-r--r--lib/libzfs/libzfs_crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_crypto.c b/lib/libzfs/libzfs_crypto.c
index 5fb93d265..e31d4ce44 100644
--- a/lib/libzfs/libzfs_crypto.c
+++ b/lib/libzfs/libzfs_crypto.c
@@ -472,7 +472,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);
}