ueventd: support by-name symlinks for PCI block devices

To ensure that well-crafted removable media can't spoof the
internal partitions, for platform devices the controller id
is inside the generated path.

We now do the same for PCI devices. The generated path has
two levels; the PCI domain/bus, and then the peripheral ID.
This lets us get by-name symlinks for PCI media, such as the
SATA controllers on PC-like hardware. The symlinks will be
created under /dev/block/pci/. For example:

/dev/block/pci/pci0000:00/0000:00:1f.2/by-name/

Change-Id: Icee3e86bef5569c2bbd94c26bc00d49028345e3b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
1 file changed