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

Re: [PATCH v2 4/5] Patch the CHRP boot script

Hi Nathan,

On 11/21/2017 03:09 PM, Nathan Fontenot wrote:
Here's the output of ofpath and ofpathname for /dev/sda2 on the my Mac mini
root@mac-mini:~# ofpath /dev/sda2

root@mac-mini:~# ofpathname /dev/sda2
/usr/sbin/ofpathname: line 812: warning: command substitution: ignored null
byte in input

So here, ofpathname gets confused by the fact that Linux shows ATA
devices as scsi (which is a Linux'ism). ofpath has workarounds to deal
with that which should probably be ported over.

Also interesting, it looks like ofpathname cannot even give a "correct"
result for an IBM machine, at least not for my p5 520Q:
root@p5-520q:~# lsblk
sda      8:0    0 136.7G  0 disk
├─sda1   8:1    0     7M  0 part
├─sda2   8:2    0 131.1G  0 part
├─sda3   8:3    0     1K  0 part
└─sda5   8:5    0   5.6G  0 part
sr0     11:0    1  1024M  0 rom

root@p5-520q:~# ofpath /dev/sda1

root@p5-520q:~# ofpathname /dev/sda1

root@p5-520q:~# ofpath /dev/sda2

root@p5-520q:~# ofpathname /dev/sda2

Please notice that ofpathname returns the same result for two different
partitions. :-/

Ouch. I think ofpathname is still maintained by some of our IBM guys
isn't it ? Might be worth digging there (or fixing it up !).

Nathan, do you know anything about this ?

I haven't seen this before.

I don't have access to a Mac to re-create what you're seeing above, if you can
send me the output from running the script with 'set -x' at the top I will take a

You could also do this for the command above that produces the waning on line 812.

I just ran ofpathname with set -x on my 11,2 Power Mac G5 and 10,1 Mac mini (results are in the attached compressed text file). I can do the same for my p5 520Q tomorrow in the morning.


Attachment: ofpathname-w-set--x.md.gz
Description: application/gzip

Reply to: