diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-04-08 18:19:10 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-04-08 18:19:10 +0200 |
commit | 6464f0ea2b1c62692c7032abecc1a794d2ab7dee (patch) | |
tree | 45b555985d409aa07866d016dc4dd4638d6a2e85 /udevtrigger.c | |
parent | f7dd3a57a40282f1c3fb9ad90a30d58b31b64ff8 (diff) |
udevtrigger: fix event order
Thanks for the fix to:
Thomas de Grenier de Latour <degrenier@easyconnect.fr>
Diffstat (limited to 'udevtrigger.c')
-rw-r--r-- | udevtrigger.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/udevtrigger.c b/udevtrigger.c index bc8453a82a..2d5772fd6b 100644 --- a/udevtrigger.c +++ b/udevtrigger.c @@ -74,16 +74,17 @@ LIST_HEAD(device_last_list); static int device_list_insert(const char *path) { struct list_head *device_list = &device_default_list; + const char *devpath = &path[strlen(sysfs_path)]; int i; for (i = 0; first_list[i] != NULL; i++) { - if (strncmp(path, first_list[i], strlen(first_list[i])) == 0) { + if (strncmp(devpath, first_list[i], strlen(first_list[i])) == 0) { device_list = &device_first_list; break; } } for (i = 0; last_list[i] != NULL; i++) { - if (strncmp(path, last_list[i], strlen(last_list[i])) == 0) { + if (strncmp(devpath, last_list[i], strlen(last_list[i])) == 0) { device_list = &device_last_list; break; } |