mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-11-23 23:10:57 +07:00
udev/path_id: introduce support for NVMe devices
This appends the nvme name and namespace identifier attribute the the PCI path for by-path links. Symlinks like the following are now present: lrwxrwxrwx. 1 root root 13 Sep 16 12:12 pci-0000:01:00.0-nvme-1 -> ../../nvme0n1 lrwxrwxrwx. 1 root root 15 Sep 16 12:12 pci-0000:01:00.0-nvme-1-part1 -> ../../nvme0n1p1 Cc: Michal Sekletar <sekletar.m@gmail.com> Signed-off-by: Keith Busch <keith.busch@intel.com>
This commit is contained in:
parent
f2d455e5d1
commit
cad674e76e
@ -636,6 +636,15 @@ static int builtin_path_id(struct udev_device *dev, int argc __attribute__((unus
|
|||||||
parent = skip_subsystem(parent, "scm");
|
parent = skip_subsystem(parent, "scm");
|
||||||
supported_transport = true;
|
supported_transport = true;
|
||||||
supported_parent = true;
|
supported_parent = true;
|
||||||
|
} else if (streq(subsys, "nvme")) {
|
||||||
|
const char *nsid = udev_device_get_sysattr_value(dev, "nsid");
|
||||||
|
|
||||||
|
if (nsid) {
|
||||||
|
path_prepend(&path, "nvme-%s", nsid);
|
||||||
|
parent = skip_subsystem(parent, "nvme");
|
||||||
|
supported_parent = true;
|
||||||
|
supported_transport = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parent = udev_device_get_parent(parent);
|
parent = udev_device_get_parent(parent);
|
||||||
|
Loading…
Reference in New Issue
Block a user