On 11/20/2014 09:12 AM, Michal Privoznik wrote:
<...snip...>
> @@ -451,10 +451,10 @@
virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
> continue;
> }
>
> - found = true;
> - VIR_DEBUG("Found LU '%s'", lun_dirent->d_name);
> + VIR_DEBUG("Found possible LU '%s'",
lun_dirent->d_name);
>
> - processLU(pool, scanhost, bus, target, lun);
> + if (processLU(pool, scanhost, bus, target, lun) == 0)
> + found = true;
Do we want 'break' here to jump out from the loop too?
No as we need to find "all" LU's - this just indicates that we found at
least one. The called function will add the LU's to the pool.
John
> }
>
> if (!found)
>
Either way, that's just an optimization, so ACK.
Michal