chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check ifindex > 0 instead of subsystem == "net"
[elogind.git]
/
udev
/
udev-node.c
diff --git
a/udev/udev-node.c
b/udev/udev-node.c
index a9ffa988b14f0f3d66645b12d949c8e1d42979ee..0ceb1d5110b0642102a6b49e10eb8a807c8908d4 100644
(file)
--- a/
udev/udev-node.c
+++ b/
udev/udev-node.c
@@
-243,26
+243,20
@@
static const char *link_find_prioritized(struct udev_device *dev, bool add, cons
for (;;) {
struct udev_device *dev_db;
struct dirent *dent;
for (;;) {
struct udev_device *dev_db;
struct dirent *dent;
- int maj, min;
- char type, type2;
- dev_t devnum;
dent = readdir(dir);
if (dent == NULL || dent->d_name[0] == '\0')
break;
if (dent->d_name[0] == '.')
continue;
dent = readdir(dir);
if (dent == NULL || dent->d_name[0] == '\0')
break;
if (dent->d_name[0] == '.')
continue;
- if (sscanf(dent->d_name, "%c%i:%i", &type, &maj, &min) != 3)
- continue;
- info(udev, "found '%c%i:%i' claiming '%s'\n", type, maj, min, stackdir);
- devnum = makedev(maj, min);
+
+ info(udev, "found '%s' claiming '%s'\n", dent->d_name, stackdir);
/* did we find ourself? */
/* did we find ourself? */
- type2 = strcmp(udev_device_get_subsystem(dev), "block") == 0 ? 'b' : 'c';
- if (udev_device_get_devnum(dev) == devnum && type == type2)
+ if (strcmp(dent->d_name, udev_device_get_id_filename(dev)) == 0)
continue;
continue;
- dev_db = udev_device_new_from_
devnum(udev, type, devnum
);
+ dev_db = udev_device_new_from_
id_filename(udev, dent->d_name
);
if (dev_db != NULL) {
const char *devnode;
if (dev_db != NULL) {
const char *devnode;