Skip to content

Commit f3678d7

Browse files
authored
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 <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #12410
1 parent ae1e40b commit f3678d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/libzfs/libzfs_crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ get_key_material_file(libzfs_handle_t *hdl, const char *uri,
486486
ret = errno;
487487
errno = 0;
488488
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
489-
"Failed to open key material file"));
489+
"Failed to open key material file: %s"), strerror(ret));
490490
return (ret);
491491
}
492492

0 commit comments

Comments
 (0)