diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-12-24 17:58:52 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-12-24 17:58:52 +0100 |
commit | 779f4de1b93b77f84527d9916a1af462fc2579a1 (patch) | |
tree | 7eb5646c25685e3ce8e70a200fcce309f51cfe84 /udev | |
parent | f775ccfcf2fadfc1224405b676a8b64d2a19f3ad (diff) | |
download | systemd-779f4de1b93b77f84527d9916a1af462fc2579a1.tar.gz |
builtin: rename load()/unload() to init()/exit()
Diffstat (limited to 'udev')
-rw-r--r-- | udev/udev-builtin-kmod.c | 10 | ||||
-rw-r--r-- | udev/udev-builtin.c | 12 | ||||
-rw-r--r-- | udev/udev.h | 4 | ||||
-rw-r--r-- | udev/udevadm-test-builtin.c | 4 | ||||
-rw-r--r-- | udev/udevadm-test.c | 4 | ||||
-rw-r--r-- | udev/udevd.c | 8 |
6 files changed, 21 insertions, 21 deletions
diff --git a/udev/udev-builtin-kmod.c b/udev/udev-builtin-kmod.c index 10afcd5db0..8e7a50a020 100644 --- a/udev/udev-builtin-kmod.c +++ b/udev/udev-builtin-kmod.c @@ -2,7 +2,7 @@ * load kernel modules * * Copyright (C) 2011 Kay Sievers <kay.sievers@vrfy.org> - * Copyright (C) 2011 ProFUSION embedded systems + * Copyright (C) 2011 ProFUSION embedded systems * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -337,7 +337,7 @@ static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool te return EXIT_SUCCESS; } -static int builtin_kmod_load(struct udev *udev) +static int builtin_kmod_init(struct udev *udev) { kmod_unref(ctx); ctx = kmod_new(NULL, NULL); @@ -348,7 +348,7 @@ static int builtin_kmod_load(struct udev *udev) return 0; } -static int builtin_kmod_unload(struct udev *udev) +static int builtin_kmod_exit(struct udev *udev) { ctx = kmod_unref(ctx); info(udev, "unload module index\n"); @@ -358,8 +358,8 @@ static int builtin_kmod_unload(struct udev *udev) const struct udev_builtin udev_builtin_kmod = { .name = "kmod", .cmd = builtin_kmod, - .load = builtin_kmod_load, - .unload = builtin_kmod_unload, + .init = builtin_kmod_init, + .exit = builtin_kmod_exit, .help = "kernel module loader", .run_once = false, }; diff --git a/udev/udev-builtin.c b/udev/udev-builtin.c index 6dfd006710..baf09b91b9 100644 --- a/udev/udev-builtin.c +++ b/udev/udev-builtin.c @@ -33,23 +33,23 @@ static const struct udev_builtin *builtins[] = { [UDEV_BUILTIN_KMOD] = &udev_builtin_kmod, }; -int udev_builtin_load(struct udev *udev) +int udev_builtin_init(struct udev *udev) { unsigned int i; for (i = 0; i < ARRAY_SIZE(builtins); i++) - if (builtins[i]->load) - builtins[i]->load(udev); + if (builtins[i]->init) + builtins[i]->init(udev); return 0; } -int udev_builtin_unload(struct udev *udev) +int udev_builtin_exit(struct udev *udev) { unsigned int i; for (i = 0; i < ARRAY_SIZE(builtins); i++) - if (builtins[i]->unload) - builtins[i]->unload(udev); + if (builtins[i]->exit) + builtins[i]->exit(udev); return 0; } diff --git a/udev/udev.h b/udev/udev.h index aafa15cd31..430958a457 100644 --- a/udev/udev.h +++ b/udev/udev.h @@ -159,8 +159,8 @@ struct udev_builtin { const char *name; int (*cmd)(struct udev_device *dev, int argc, char *argv[], bool test); const char *help; - int (*load)(struct udev *udev); - int (*unload)(struct udev *udev); + int (*init)(struct udev *udev); + int (*exit)(struct udev *udev); bool run_once; }; extern const struct udev_builtin udev_builtin_path_id; diff --git a/udev/udevadm-test-builtin.c b/udev/udevadm-test-builtin.c index ea1bcbcb07..66043c76d6 100644 --- a/udev/udevadm-test-builtin.c +++ b/udev/udevadm-test-builtin.c @@ -86,7 +86,7 @@ static int adm_builtin(struct udev *udev, int argc, char *argv[]) goto out; } - udev_builtin_load(udev); + udev_builtin_init(udev); cmd = udev_builtin_lookup(command); if (cmd >= UDEV_BUILTIN_MAX) { @@ -116,7 +116,7 @@ static int adm_builtin(struct udev *udev, int argc, char *argv[]) } out: udev_device_unref(dev); - udev_builtin_unload(udev); + udev_builtin_exit(udev); return rc; } diff --git a/udev/udevadm-test.c b/udev/udevadm-test.c index a7c6226a56..851500527f 100644 --- a/udev/udevadm-test.c +++ b/udev/udevadm-test.c @@ -103,7 +103,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) sigprocmask(SIG_SETMASK, NULL, &sigmask_orig); - udev_builtin_load(udev); + udev_builtin_init(udev); rules = udev_rules_new(udev, resolve_names); if (rules == NULL) { @@ -161,7 +161,7 @@ out: udev_event_unref(event); udev_device_unref(dev); udev_rules_unref(rules); - udev_builtin_unload(udev); + udev_builtin_exit(udev); return rc; } diff --git a/udev/udevd.c b/udev/udevd.c index a5ef24417d..3a39b6a50a 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -1513,7 +1513,7 @@ int main(int argc, char *argv[]) } fd_worker = worker_watch[READ_END]; - udev_builtin_load(udev); + udev_builtin_init(udev); rules = udev_rules_new(udev, resolve_names); if (rules == NULL) { @@ -1702,8 +1702,8 @@ int main(int argc, char *argv[]) } reload_config = 0; - udev_builtin_unload(udev); - udev_builtin_load(udev); + udev_builtin_exit(udev); + udev_builtin_init(udev); } } @@ -1717,7 +1717,7 @@ exit_daemonize: worker_list_cleanup(udev); event_queue_cleanup(udev, EVENT_UNDEF); udev_rules_unref(rules); - udev_builtin_unload(udev); + udev_builtin_exit(udev); if (fd_signal >= 0) close(fd_signal); if (worker_watch[READ_END] >= 0) |