[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

final call for testing: yabootconfig and full devfs support in ofpath



On Sat, May 26, 2001 at 04:30:46PM -0700, Tom Rini wrote:
> 
> Okay.  I've attached a patch which cleans up fixdevfs() slightly, and makes
> it parse /proc/scsi/scsi for it's info.  It also changes smalltr() to go from 
> a number to a letter as well.  It also fixed a slight logic goof so it
> should correctly translate devices other then hda/hdc.

>      else
>          DISC="$1"
>      fi

i deleted this entire if statement changing /disc -> /part it seems
totally useless now.  

> -    ## Find the bus type
> -    TYPE="${DISC#/dev/}"
> -    TYPE="${TYPE%/host*}"
> +    ## Find the bus type.
> +    TYPE="$(v=${DISC#/dev/} ; echo ${v%/host*})"

i changed this to TYPE="$(v=${1#/dev/} ; echo ${v%/host*})"  since i
got rid of the useless $DISC variable.  

>      ## Partition number
>      PARTNUM="${DISC#/dev/*/part}"

the partition number is now found the same way yabootconfig finds it:
"${KERNDEV##*[a-z]}" which will be null if we get the entire disk
thats ok.  

> +		    "$DEVID" = "$TARGET" -a "$DEVLUN" = "$LUN" ] ; then
> +		    FINALDEV=sd$(smalltr $DEVCOUNT)${1#/dev/*part}
> +		    echo $FINALDEV

changed this to:

                    DEV="sd$(smalltr $DEVCOUNT)${PARTNUM}"
                    echo "/dev/$DEV"
                    return 0

this is consistent with the way IDE works.  also the way you were
adding the partition number broke ofpath for the full disc device.  my
change fixes that.  

i have uploaded the new ofpath to http://penguinppc.org/files/users/eb

please test this, particularly against devfs systems using the devfs
names, both full disk and partitions.  with and without devfsd.  

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpTJu2Z9IphZ.pgp
Description: PGP signature


Reply to: