From 24f98ed383c978fe4ec385a912573fb1d9f3260e Mon Sep 17 00:00:00 2001 From: Allan Jude Date: Fri, 31 Jul 2020 12:07:37 -0400 Subject: [PATCH] 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 Reviewed-by: Brian Behlendorf Signed-off-by: Allan Jude Closes #10632 --- lib/libzfs/libzfs_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); }