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@9dc41a769d Submitted by: Ryan Moeller <ryan@freqlabs.com> MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D20118
This commit is contained in:
parent
f4e05cc55d
commit
4d08d25153
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351574
@ -472,7 +472,7 @@ differ(void *arg)
|
|||||||
if (err)
|
if (err)
|
||||||
return ((void *)-1);
|
return ((void *)-1);
|
||||||
if (di->zerr) {
|
if (di->zerr) {
|
||||||
ASSERT(di->zerr == EINVAL);
|
ASSERT(di->zerr == EPIPE);
|
||||||
(void) snprintf(di->errbuf, sizeof (di->errbuf),
|
(void) snprintf(di->errbuf, sizeof (di->errbuf),
|
||||||
dgettext(TEXT_DOMAIN,
|
dgettext(TEXT_DOMAIN,
|
||||||
"Internal error: bad data from diff IOCTL"));
|
"Internal error: bad data from diff IOCTL"));
|
||||||
|
Loading…
Reference in New Issue
Block a user