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

Re: ofpath vs ofpathname vs grub-ofpathname



Le ven. 17 avr. 2020 à 10:37, John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> a écrit :
> I have come up with this patch, can you test it on the mac-support branch?

No cigars:

dolbeau@powermacg5:~/powerpc-utils$ sudo ./scripts/ofpathname sda
/ht@0,f2000000/pci@9/k2-sata-root@c/@0

The first added line on your patch compares the variable 'fc' to
'sata', but if I echo $fc, it actually contains 'k2-sata-root' on my
system - so plug_id is never set (confirmed by looking at the output
of bash -x).

If I compare to 'k2-sata-root' instead, plug_id stays empty for the
first two times it's set, then the last one fallback to -1, naturally.

Looking at the setting of plug_id, it's looking for some 'host' in two
places where I don't have any (for sda):

ls: cannot access
'/sys/devices/pci0001:00/0001:00:09.0/0001:03:0c.0/ata2/host1/target1:0:0/1:0:0:0/*/host*':
No such file or directory
ls: cannot access
'/sys/devices/pci0001:00/0001:00:09.0/0001:03:0c.0/ata2/host1/target1:0:0/1:0:0:0/host*':
No such file or directory

It's only the final 'host*' part that is missing, the directory itself exists:

dolbeau@powermacg5:~/powerpc-utils$ ls
/sys/devices/pci0001:00/0001:00:09.0/0001:03:0c.0/ata2/host1/target1:0:0/1:0:0:0/
blacklist       eh_timeout                          inquiry
power         scsi_level    vpd_pg80
block           evt_capacity_change_reported        iocounterbits
queue_depth   state         vpd_pg83
bsg             evt_inquiry_change_reported         iodone_cnt
queue_type    subsystem     wwid
delete          evt_lun_change_reported             ioerr_cnt
rescan        timeout
device_blocked  evt_media_change                    iorequest_cnt
rev           type
device_busy     evt_mode_parameter_change_reported  modalias
scsi_device   uevent
dh_state        evt_soft_threshold_reached          model
scsi_disk     unload_heads
driver          generic                             ncq_prio_enable
scsi_generic  vendor

Cordially,

-- 
Romain Dolbeau


Reply to: