From b5ee6147f35fe1368f74f80bfd640beedba8500d Mon Sep 17 00:00:00 2001 From: Nikunj A Dadhania Date: Fri, 15 Nov 2013 09:51:29 +0530 Subject: 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 --- slof/fs/scsi-probe-helpers.fs | 14 +++++++++----- 1 file 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 ; -- cgit v1.1