scsi: handle report-luns failure
When report-lun fails, number of luns returned is 0. Due to FORTH semantics of "DO ... LOOP", it will enter loop and execute, when the counter is 0. For this "?DO ... LOOP" should be used to solve this problem Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
parent
2ece1754f7
commit
c03647c19b
|
@ -27,7 +27,7 @@
|
|||
dup 8 + dup alloc-mem ( devarray devcur ndev lunarray size size+ mem )
|
||||
dup rot 0 fill ( devarray devcur ndev lunarray size mem )
|
||||
dup >r swap move r> ( devarray devcur ndev mem )
|
||||
dup sector l@ 3 >> 0 DO ( devarray devcur ndev mem memcur )
|
||||
dup sector l@ 3 >> 0 ?DO ( devarray devcur ndev mem memcur )
|
||||
dup dup scsi-read-lun IF
|
||||
j swap dev-generate-srplun swap x! 8 +
|
||||
ELSE
|
||||
|
|
Loading…
Reference in New Issue