Skip to content

Commit

Permalink
Make get_key_material_file fail more verbosely
Browse files Browse the repository at this point in the history
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 openzfs#12410
  • Loading branch information
rincebrain committed Sep 22, 2021
1 parent def25f4 commit edb972e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libzfs/libzfs_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit edb972e

Please sign in to comment.