From 9dc41a769df164875d974c2431b2453e70e16c41 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Sun, 19 May 2019 17:31:54 -0700 Subject: [PATCH] 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 --- lib/libzfs/libzfs_diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c index 67e85cd204..1b5c44b047 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"));