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:
parent
32a971e749
commit
23184b172a
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue