Skip to content

Commit

Permalink
Merge pull request #272 from mscdex/add-nvme-by-path
Browse files Browse the repository at this point in the history
udev/path_id: introduce support for NVMe devices
  • Loading branch information
bbonev committed Dec 31, 2023
2 parents f2d455e + cad674e commit 3465d06
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/udev/udev-builtin-path_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3465d06

Please sign in to comment.