scst_sysfs: return EINVAL on too big LUN

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5961 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-01-09 12:23:25 +00:00
parent 292f72e16d
commit b158254766

View File

@@ -1268,6 +1268,7 @@ static int __scst_process_luns_mgmt_store(char *buffer,
goto out_unlock;
} else if (virt_lun > SCST_MAX_LUN) {
PRINT_ERROR("Too big LUN %ld (max %d)", virt_lun, SCST_MAX_LUN);
res = -EINVAL;
goto out_unlock;
}