From: Ryan Moeller Date: Mon, 20 May 2019 00:31:54 +0000 (-0700) Subject: Fix wrong assertion in libzfs diff error handling X-Git-Tag: zfs-0.8.0~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9dc41a769df164875d974c2431b2453e70e16c41;p=zfs Fix wrong assertion in libzfs diff error handling In compare(), all error cases set the error code to EPIPE, so when an error is set, the correct assertion to make is that the error is EPIPE, not EINVAL. Reviewed-by: Richard Elling Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #8743 --- diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c index 67e85cd20..1b5c44b04 100644 --- a/lib/libzfs/libzfs_diff.c +++ b/lib/libzfs/libzfs_diff.c @@ -478,7 +478,7 @@ differ(void *arg) if (err) return ((void *)-1); if (di->zerr) { - ASSERT(di->zerr == EINVAL); + ASSERT(di->zerr == EPIPE); (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, "Internal error: bad data from diff IOCTL"));