summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-10-28 20:20:59 +0100
committerTom Gundersen <teg@jklm.no>2013-10-29 14:17:57 +0100
commit0b99c9f8f0cbfe9ab3de443cb6f94ecd7d21eae3 (patch)
tree164c8679e1b4953681fc0e4cd189df38e1173455 /src
parent9dc670ea766c711741f462b29572f2e5f8f3f6bc (diff)
udev: builtin - rename net_link to net_setup_link
Also add shell completions.
Diffstat (limited to 'src')
-rw-r--r--src/udev/udev-builtin-net_setup_link.c (renamed from src/udev/udev-builtin-net_link.c)20
-rw-r--r--src/udev/udev-builtin.c2
-rw-r--r--src/udev/udev.h2
3 files changed, 12 insertions, 12 deletions
diff --git a/src/udev/udev-builtin-net_link.c b/src/udev/udev-builtin-net_setup_link.c
index f4fb63ec51..739221ba2b 100644
--- a/src/udev/udev-builtin-net_link.c
+++ b/src/udev/udev-builtin-net_setup_link.c
@@ -25,7 +25,7 @@
link_config_ctx *ctx;
-static int builtin_net_link(struct udev_device *dev, int argc, char **argv, bool test) {
+static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv, bool test) {
link_config *link;
int r;
@@ -54,7 +54,7 @@ static int builtin_net_link(struct udev_device *dev, int argc, char **argv, bool
return EXIT_SUCCESS;
}
-static int builtin_net_link_init(struct udev *udev) {
+static int builtin_net_setup_link_init(struct udev *udev) {
int r;
if (ctx)
@@ -72,12 +72,12 @@ static int builtin_net_link_init(struct udev *udev) {
return 0;
}
-static void builtin_net_link_exit(struct udev *udev) {
+static void builtin_net_setup_link_exit(struct udev *udev) {
link_config_ctx_free(ctx);
log_debug("Unloaded link configuration context");
}
-static bool builtin_net_link_validate(struct udev *udev) {
+static bool builtin_net_setup_link_validate(struct udev *udev) {
log_debug("Check if link configuration needs reloading");
if (!ctx)
return false;
@@ -85,12 +85,12 @@ static bool builtin_net_link_validate(struct udev *udev) {
return link_config_should_reload(ctx);
}
-const struct udev_builtin udev_builtin_net_link = {
- .name = "net_link",
- .cmd = builtin_net_link,
- .init = builtin_net_link_init,
- .exit = builtin_net_link_exit,
- .validate = builtin_net_link_validate,
+const struct udev_builtin udev_builtin_net_setup_link = {
+ .name = "net_setup_link",
+ .cmd = builtin_net_setup_link,
+ .init = builtin_net_setup_link_init,
+ .exit = builtin_net_setup_link_exit,
+ .validate = builtin_net_setup_link_validate,
.help = "configure network link",
.run_once = false,
};
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
index 85901e8ee3..fd373d04dc 100644
--- a/src/udev/udev-builtin.c
+++ b/src/udev/udev-builtin.c
@@ -44,7 +44,7 @@ static const struct udev_builtin *builtins[] = {
[UDEV_BUILTIN_KMOD] = &udev_builtin_kmod,
#endif
[UDEV_BUILTIN_NET_ID] = &udev_builtin_net_id,
- [UDEV_BUILTIN_NET_LINK] = &udev_builtin_net_link,
+ [UDEV_BUILTIN_NET_LINK] = &udev_builtin_net_setup_link,
[UDEV_BUILTIN_PATH_ID] = &udev_builtin_path_id,
[UDEV_BUILTIN_USB_ID] = &udev_builtin_usb_id,
#ifdef HAVE_ACL
diff --git a/src/udev/udev.h b/src/udev/udev.h
index 7cca8b8c83..46235b13a7 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
@@ -184,7 +184,7 @@ extern const struct udev_builtin udev_builtin_keyboard;
extern const struct udev_builtin udev_builtin_kmod;
#endif
extern const struct udev_builtin udev_builtin_net_id;
-extern const struct udev_builtin udev_builtin_net_link;
+extern const struct udev_builtin udev_builtin_net_setup_link;
extern const struct udev_builtin udev_builtin_path_id;
extern const struct udev_builtin udev_builtin_usb_id;
extern const struct udev_builtin udev_builtin_uaccess;