Re: Verifying ofpathname - was: Re: Workaround for installing Debian onto PowerMacs (2020-02-02 image)
Hello!
On 2/8/21 6:31 PM, John Paul Adrian Glaubitz wrote:> Hello!
>
> On 2/8/21 3:14 PM, John Paul Adrian Glaubitz wrote:
>> I would be surprised to see that ofpathname returns wrong paths on PowerMac G5s as we explicitly
>> tested the tool on these machines as well. I will soon have access to my G5 machines again so I
>> verify that myself. There might be a bug hiding somewhere.
>
> Could someone with a PowerMac G5 running the latest version of Debian unstable please
> run the following commands and paste the output here?
>
> # ofpathname /dev/sda
> # ofpathname /dev/sda1
> # ofpathname /dev/sda2
>
> and for other disks and partitions possibly on the system?
Thanks to the quick help of Cameron MacPherson I was able to figure out what's wrong
and in fact the script forgets to set SYS_PATH in l2of_scsi() which was easy to fix:
glaubitz@propaganda:~/tmp5/powerpc-utils-1.3.8/scripts$ ./ofpathname /dev/sda2
/ht@0,f2000000/pci@7/k2-sata-root@c/@0/@0:2
glaubitz@propaganda:~/tmp5/powerpc-utils-1.3.8/scripts$ /sbin/ofpath /dev/sda2
/ht@0,f2000000/pci@7/k2-sata-root@c/@0/@0:2
glaubitz@propaganda:~/tmp5/powerpc-utils-1.3.8/scripts$ cd
glaubitz@propaganda:~$ diff -u tmp4/powerpc-utils-1.3.8/scripts/ofpathname tmp5/powerpc-utils-1.3.8/scripts/ofpathname
--- tmp4/powerpc-utils-1.3.8/scripts/ofpathname 2021-02-08 12:44:11.000000000 -0800
+++ tmp5/powerpc-utils-1.3.8/scripts/ofpathname 2021-02-08 12:46:25.457814160 -0800
@@ -807,6 +807,7 @@
if [[ -e $PWD/devspec ]]; then
OF_PATH=`$CAT $PWD/devspec`
+ SYS_PATH=$PWD
else
err $ERR_NO_OFPATH
fi
glaubitz@propaganda:~$
Looks like I accidentally dropped that line when I submitted the patch upstream.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: