aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-08-28 17:39:46 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-08-28 17:39:46 +0000
commit4d08d2515332b149ee446464daa5fe01b5b33e49 (patch)
tree39a44eddd6e3a81117e86fcb98321bad79fb2d22 /cddl/contrib/opensolaris/lib
parentf4e05cc55da19b0777b9d8044ad9e2d352b569e6 (diff)
downloadsrc-4d08d2515332b149ee446464daa5fe01b5b33e49.tar.gz
src-4d08d2515332b149ee446464daa5fe01b5b33e49.zip
MFV/ZoL: 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 <Richard.Elling@RichardElling.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@freqlabs.com> Closes #8743 zfsonlinux/zfs@9dc41a769df164875d974c2431b2453e70e16c41 Submitted by: Ryan Moeller <ryan@freqlabs.com> MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D20118
Notes
Notes: svn path=/head/; revision=351574
Diffstat (limited to 'cddl/contrib/opensolaris/lib')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
index 26524e78086c..db132190154c 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
@@ -472,7 +472,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"));