Wrap bare EINVAL returns with SET_ERROR
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11636
This commit is contained in:
parent
6150fbe67f
commit
818bc70c32
|
@ -3986,7 +3986,7 @@ zfs_ioc_pool_initialize(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
|
|||
fnvlist_free(vdev_errlist);
|
||||
|
||||
spa_close(spa, FTAG);
|
||||
return (total_errors > 0 ? EINVAL : 0);
|
||||
return (total_errors > 0 ? SET_ERROR(EINVAL) : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4071,7 +4071,7 @@ zfs_ioc_pool_trim(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
|
|||
fnvlist_free(vdev_errlist);
|
||||
|
||||
spa_close(spa, FTAG);
|
||||
return (total_errors > 0 ? EINVAL : 0);
|
||||
return (total_errors > 0 ? SET_ERROR(EINVAL) : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue