chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pack parsed rules list
[elogind.git]
/
udev.c
diff --git
a/udev.c
b/udev.c
index 36ff21d5b71c0ef231e325fb8ca4e728994b2bc4..7a0484472aa2ee0f63eefc05d12efdc934a4cdfe 100644
(file)
--- a/
udev.c
+++ b/
udev.c
@@
-68,6
+68,7
@@
static void asmlinkage sig_handler(int signum)
int main(int argc, char *argv[], char *envp[])
{
struct udevice udev;
int main(int argc, char *argv[], char *envp[])
{
struct udevice udev;
+ struct udev_rules rules;
char path[PATH_SIZE];
const char *error;
const char *action;
char path[PATH_SIZE];
const char *error;
const char *action;
@@
-118,7
+119,7
@@
int main(int argc, char *argv[], char *envp[])
}
udev_init_device(&udev, devpath, subsystem, action);
}
udev_init_device(&udev, devpath, subsystem, action);
- udev_rules_init();
+ udev_rules_init(
&rules, 0
);
if (udev.type == DEV_BLOCK || udev.type == DEV_CLASS || udev.type == DEV_NET) {
/* handle device node */
if (udev.type == DEV_BLOCK || udev.type == DEV_CLASS || udev.type == DEV_NET) {
/* handle device node */
@@
-143,7
+144,7
@@
int main(int argc, char *argv[], char *envp[])
if (udev.type == DEV_NET || udev.devt) {
/* name device */
if (udev.type == DEV_NET || udev.devt) {
/* name device */
- udev_rules_get_name(&udev, class_dev);
+ udev_rules_get_name(&
rules, &
udev, class_dev);
if (udev.ignore_device) {
info("device event will be ignored");
goto cleanup;
if (udev.ignore_device) {
info("device event will be ignored");
goto cleanup;
@@
-157,7
+158,7
@@
int main(int argc, char *argv[], char *envp[])
retval = udev_add_device(&udev, class_dev);
} else {
dbg("no dev-file found");
retval = udev_add_device(&udev, class_dev);
} else {
dbg("no dev-file found");
- udev_rules_get_run(&udev, NULL);
+ udev_rules_get_run(&
rules, &
udev, NULL);
if (udev.ignore_device) {
info("device event will be ignored");
goto cleanup;
if (udev.ignore_device) {
info("device event will be ignored");
goto cleanup;
@@
-166,7
+167,7
@@
int main(int argc, char *argv[], char *envp[])
sysfs_close_class_device(class_dev);
} else if (strcmp(action, "remove") == 0) {
dbg("node remove");
sysfs_close_class_device(class_dev);
} else if (strcmp(action, "remove") == 0) {
dbg("node remove");
- udev_rules_get_run(&udev, NULL);
+ udev_rules_get_run(&
rules, &
udev, NULL);
if (udev.ignore_device) {
dbg("device event will be ignored");
goto cleanup;
if (udev.ignore_device) {
dbg("device event will be ignored");
goto cleanup;
@@
-193,7
+194,7
@@
int main(int argc, char *argv[], char *envp[])
}
dbg("devices device opened '%s'", path);
wait_for_devices_device(devices_dev, &error);
}
dbg("devices device opened '%s'", path);
wait_for_devices_device(devices_dev, &error);
- udev_rules_get_run(&udev, devices_dev);
+ udev_rules_get_run(&
rules, &
udev, devices_dev);
sysfs_close_device(devices_dev);
if (udev.ignore_device) {
info("device event will be ignored");
sysfs_close_device(devices_dev);
if (udev.ignore_device) {
info("device event will be ignored");
@@
-201,7
+202,7
@@
int main(int argc, char *argv[], char *envp[])
}
} else {
dbg("default handling");
}
} else {
dbg("default handling");
- udev_rules_get_run(&udev, NULL);
+ udev_rules_get_run(&
rules, &
udev, NULL);
if (udev.ignore_device) {
info("device event will be ignored");
goto cleanup;
if (udev.ignore_device) {
info("device event will be ignored");
goto cleanup;
@@
-214,7
+215,7
@@
run:
dbg("executing run list");
list_for_each_entry(name_loop, &udev.run_list, node)
dbg("executing run list");
list_for_each_entry(name_loop, &udev.run_list, node)
- execute_
command(name_loop->name, udev.subsystem
);
+ execute_
program(name_loop->name, udev.subsystem, NULL, 0, NULL
);
}
cleanup:
}
cleanup: