1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

udevtrigger: fix event order

Thanks for the fix to:
  Thomas de Grenier de Latour <degrenier@easyconnect.fr>
This commit is contained in:
Kay Sievers 2006-04-08 18:19:10 +02:00
parent f7dd3a57a4
commit 6464f0ea2b

View File

@ -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;
}