summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udev-builtin.c')
-rw-r--r--src/udev/udev-builtin.c24
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)