aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs/libzfs_util.c
diff options
context:
space:
mode:
authorAllan Jude <[email protected]>2020-07-31 12:07:37 -0400
committerGitHub <[email protected]>2020-07-31 09:07:37 -0700
commit24f98ed383c978fe4ec385a912573fb1d9f3260e (patch)
tree06ca4df109d7ff894aa22a4a13ec210ea64d3592 /lib/libzfs/libzfs_util.c
parenteabf270b2c5902967e04ad8b3c6eca381964f24c (diff)
When encountering EZFS_UNKNOWN, print the error text buffer anyway
Rather than just saying there was an internal error, provide any context we might have to the user to help them understand the issue. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Allan Jude <[email protected]> Closes #10632
Diffstat (limited to 'lib/libzfs/libzfs_util.c')
-rw-r--r--lib/libzfs/libzfs_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index 65e126844..a27c5cc27 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -327,7 +327,8 @@ zfs_verror(libzfs_handle_t *hdl, int error, const char *fmt, va_list ap)
if (hdl->libzfs_printerr) {
if (error == EZFS_UNKNOWN) {
(void) fprintf(stderr, dgettext(TEXT_DOMAIN, "internal "
- "error: %s\n"), libzfs_error_description(hdl));
+ "error: %s: %s\n"), hdl->libzfs_action,
+ libzfs_error_description(hdl));
abort();
}