Date: Wed, 28 Aug 2019 17:39:46 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351574 - head/cddl/contrib/opensolaris/lib/libzfs/common Message-ID: <201908281739.x7SHdk4r069267@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Aug 28 17:39:46 2019 New Revision: 351574 URL: https://svnweb.freebsd.org/changeset/base/351574 Log: 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 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Wed Aug 28 17:01:28 2019 (r351573) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Wed Aug 28 17:39:46 2019 (r351574) @@ -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"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908281739.x7SHdk4r069267>