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 <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #10632
This commit is contained in:
Allan Jude 2020-07-31 12:07:37 -04:00 committed by GitHub
parent eabf270b2c
commit 24f98ed383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}