rhboot/efivar

make_pci_path failed due to sysfs file name

Closed this issue · 1 comments

In efivar/src/linux.c, in function make_pci_path, the source tries to read the sysfs file for uid with:
rc = read_sysfs_file(&fbuf, "/sys/devices/pci%4x:%02x/firmware_node/uid", root_domain, root_bus);
which results in "/sys/devices/pci 0:00/firmware_node/uid" with root_domain & root_bus =0.

Unfortunately, the real path is the following:
/sys/devices/pci0000:00/firmware_node/uid

So the correct format should be (root_domain formatted on 4 digits minimum):
rc = read_sysfs_file(&fbuf, "/sys/devices/pci%04x:%02x/firmware_node/uid", root_domain, root_bus);

Cedric

Thanks, fixed in master now.