ofpath bugfix powerpc g5 dual sata
Przemyslaw Iskra
sparky at pld-linux.org
Wed Nov 19 04:20:02 EST 2008
On Tue, Nov 18, 2008 at 04:40:30PM +0100, Roman Rakus wrote:
> peter cros wrote:
>> This one still needs fixing.
I think this file requires unification.
>>> --- yaboot/ybin/ofpath 2008-09-26 21:36:38.000000000 +1000
>>> +++ test/ybin/ofpath 2008-09-26 16:41:00.000000000 +1000
>>> @@ -306,7 +306,8 @@ scsi_ofpath()
>>> K2_DEVICE_ID=0
>>> while [ "$DEVICE_PATH" = "" ] ; do
>>> SCSI_HOSTNUMBER=`expr $SCSI_HOSTNUMBER - 1`
backticks `` for execution + expr for math
>>> - let "K2_DEVICE_ID += 1"
>>> +# let not found in dash # let "K2_DEVICE_ID += 1"
>>> + K2_DEVICE_ID=$((K2_DEVICE_ID+1))
let / $(()) for math
>>> DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
$() for execution
Would be nice to stick to one form, seems like older versions preffer
$(()) for math, it spawns less children; and mostly $() is used for
execution, but there are many exceptions.
> I can confirm that `let' is bashism (bash builtin) and is better to
> avoid using it. Patch you proposed looks well. Using $(()) is posixly
> correct arithmetic expansion. What do you think Paul? There are no other
> let statements.
some other shells (ksh) also allow use of "let", but it isn't POSIX
compliant so it should be replaced.
--
____ Sparky{PI] -- Przemyslaw _ ___ _ _ ........... LANG...Pl..Ca..Es..En
/____) ___ ___ _ _ || Iskra | | _ \| | | : WWW........ppcrcd.pld-linux.org
\____\| -_)'___| ||^'||//\\// < | _/| | | : JID......sparky<at>jabberes.org
(____/|| (_-_|_|| ||\\ || |_ |_| |_| _| : Mail....sparky<at>pld-linux.org
More information about the Yaboot-devel
mailing list