diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-11-15 09:51:29 +0530 |
---|---|---|
committer | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-11-15 10:36:51 +0530 |
commit | b5ee6147f35fe1368f74f80bfd640beedba8500d (patch) | |
tree | fee0a9aac809c6a73f8ef94b9a573f6d03a0b9ba | |
parent | 32dcbfadcddb33ea7a74581a7935accea1aee4c6 (diff) | |
download | SLOF-b5ee6147f35fe1368f74f80bfd640beedba8500d.zip SLOF-b5ee6147f35fe1368f74f80bfd640beedba8500d.tar.gz SLOF-b5ee6147f35fe1368f74f80bfd640beedba8500d.tar.bz2 |
scsi: make-media-alias fix
* disk alias names are not correct
* also drop stack variable in case we overflow max-alias
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
-rw-r--r-- | slof/fs/scsi-probe-helpers.fs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/slof/fs/scsi-probe-helpers.fs b/slof/fs/scsi-probe-helpers.fs index 307838f..62416bd 100644 --- a/slof/fs/scsi-probe-helpers.fs +++ b/slof/fs/scsi-probe-helpers.fs @@ -62,12 +62,16 @@ TO srplun 2dup find-alias IF drop MAX-ALIAS 1 DO - i $cathex 2dup find-alias 0= IF - strdup srplun make-disk-alias UNLOOP EXIT - ELSE drop THEN - LOOP + 2dup i $cathex find-alias 0= IF + 2dup i $cathex strdup + srplun make-disk-alias + 2drop + UNLOOP EXIT + ELSE drop THEN + LOOP + 2drop ELSE - srplun make-disk-alias + srplun make-disk-alias THEN ; |