summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-09 14:15:03 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-09 14:15:03 +0100
commitbae687d885dc9df257a23ab6aab08c579190fd53 (patch)
treec9d934268c14607f4f8d164a4982410646b15e2d /src/udev
parent547725df8983f4d9d7ba583b5bbb98c7b881fba5 (diff)
parentf073b1b3c0f4f0df1b0bd61042ce85fb5d27d407 (diff)
Merge pull request #2561 from msekletar/virtio-blk-by-path
path_id: reintroduce by-path links for virtio block devices
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-builtin-path_id.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
index 7851cec17f..44fb5334b3 100644
--- a/src/udev/udev-builtin-path_id.c
+++ b/src/udev/udev-builtin-path_id.c
@@ -665,6 +665,12 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
parent = skip_subsystem(parent, "xen");
supported_parent = true;
+ } else if (streq(subsys, "virtio")) {
+ while (parent && streq_ptr("virtio", udev_device_get_subsystem(parent)))
+ parent = udev_device_get_parent(parent);
+ path_prepend(&path, "virtio-pci-%s", udev_device_get_sysname(parent));
+ supported_transport = true;
+ supported_parent = true;
} else if (streq(subsys, "scm")) {
path_prepend(&path, "scm-%s", udev_device_get_sysname(parent));
parent = skip_subsystem(parent, "scm");