Merge pull request #272 from mscdex/add-nvme-by-path

udev/path_id: introduce support for NVMe devices
This commit is contained in:
Boian Bonev 2023-12-31 20:31:25 +02:00 committed by GitHub
commit 3465d068b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -636,6 +636,15 @@ static int builtin_path_id(struct udev_device *dev, int argc __attribute__((unus
parent = skip_subsystem(parent, "scm");
supported_transport = 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);