char nosleep[] = "UDEV_NO_SLEEP=1";
char *env[] = { action, devpath, nosleep, NULL };
- strcpy(action, "DEVPATH=%s");
- strfieldcat(action, path);
+ strcpy(devpath, "DEVPATH=");
+ strfieldcat(devpath, path);
pid = fork();
switch (pid) {
udev_exec(filename, "block");
}
}
+ closedir(dir3);
}
}
+ closedir(dir2);
}
}
+ closedir(dir);
}
devpath = "class";
udev_exec(filename, dent->d_name);
}
}
+ closedir(dir3);
}
}
+ closedir(dir2);
}
}
+ closedir(dir);
}
}