chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add virtio-blk support to path_id
[elogind.git]
/
extras
/
path_id
/
path_id.c
diff --git
a/extras/path_id/path_id.c
b/extras/path_id/path_id.c
index 4b57dec0d31caf3ba7b4f560e5fc2eca582137f8..c19bfd0f8d59fae57a74d1ba88ab47748efc6f08 100644
(file)
--- a/
extras/path_id/path_id.c
+++ b/
extras/path_id/path_id.c
@@
-1,8
+1,10
@@
/*
/*
- * compose persis
is
tent device path
+ * compose persistent device path
*
* Copyright (C) 2009 Kay Sievers <kay.sievers@vrfy.org>
*
*
* Copyright (C) 2009 Kay Sievers <kay.sievers@vrfy.org>
*
+ * Logic based on Hannes Reinecke's shell script.
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
@@
-31,7
+33,7
@@
#include "libudev.h"
#include "libudev-private.h"
#include "libudev.h"
#include "libudev-private.h"
-int debug;
+
static
int debug;
static void log_fn(struct udev *udev, int priority,
const char *file, int line, const char *fn,
static void log_fn(struct udev *udev, int priority,
const char *file, int line, const char *fn,
@@
-446,6
+448,9
@@
int main(int argc, char **argv)
} else if (strcmp(subsys, "xen") == 0) {
path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
parent = skip_subsystem(parent, "xen");
} else if (strcmp(subsys, "xen") == 0) {
path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
parent = skip_subsystem(parent, "xen");
+ } else if (strcmp(subsys, "virtio") == 0) {
+ path_prepend(&path, "virtio-pci-%s", udev_device_get_sysname(parent));
+ parent = skip_subsystem(parent, "virtio");
}
parent = udev_device_get_parent(parent);
}
parent = udev_device_get_parent(parent);