diff options
author | Kay Sievers <kay@vrfy.org> | 2012-10-26 03:43:56 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-10-26 03:45:25 +0200 |
commit | 4af113f9971217991cce51b45f15bdce22ee45e2 (patch) | |
tree | 1c19ee53d43cc9a33f1865e3ad900962c81848e1 /src/udev/udev-builtin.c | |
parent | journal: introduce entry array chain cache (diff) | |
download | systemd-4af113f9971217991cce51b45f15bdce22ee45e2.tar.xz systemd-4af113f9971217991cce51b45f15bdce22ee45e2.zip |
udev: builtin - do not fail builtin initialization if one of them returns an error
Diffstat (limited to 'src/udev/udev-builtin.c')
-rw-r--r-- | src/udev/udev-builtin.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index 26ee16c669..2ea7f4e202 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -41,24 +41,18 @@ static const struct udev_builtin *builtins[] = { #endif }; -int udev_builtin_init(struct udev *udev) +void udev_builtin_init(struct udev *udev) { unsigned int i; - int err = 0; if (initialized) - return 0; + return; - for (i = 0; i < ELEMENTSOF(builtins); i++) { - if (builtins[i]->init) { - err = builtins[i]->init(udev); - if (err < 0) - break; - } - } + for (i = 0; i < ELEMENTSOF(builtins); i++) + if (builtins[i]->init) + builtins[i]->init(udev); initialized = true; - return err; } void udev_builtin_exit(struct udev *udev) @@ -78,13 +72,11 @@ void udev_builtin_exit(struct udev *udev) bool udev_builtin_validate(struct udev *udev) { unsigned int i; - bool change = false; for (i = 0; i < ELEMENTSOF(builtins); i++) - if (builtins[i]->validate) - if (builtins[i]->validate(udev)) - change = true; - return change; + if (builtins[i]->validate && builtins[i]->validate(udev)) + return true; + return false; } void udev_builtin_list(struct udev *udev) |