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
This commit is contained in:
Rich Ercolani 2021-08-05 19:48:33 -04:00 committed by Tony Hutter
parent 32a971e749
commit 23184b172a
1 changed files with 1 additions and 1 deletions

View File

@ -472,7 +472,7 @@ get_key_material_file(libzfs_handle_t *hdl, const char *uri,
ret = errno; ret = errno;
errno = 0; errno = 0;
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"Failed to open key material file")); "Failed to open key material file: %s"), strerror(ret));
return (ret); return (ret);
} }