diff options
author | Corubba Smith <corubba@gmx.de> | 2025-03-12 15:56:48 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2025-03-12 16:31:43 +0100 |
commit | 15b89e41a5365adf81a6f2b70fbd733f0343c91b (patch) | |
tree | 1a29ad60787554960f14eb34f80e1ddbd214218c | |
parent | 51d46956e78b0bc204209f2fbbd0f2ce8d366aa7 (diff) |
all: remove trivial configure hooks
These are now covered by the default implementation.
Signed-off-by: Corubba Smith <corubba@gmx.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r-- | filter/ulogd_filter_MARK.c | 10 | ||||
-rw-r--r-- | input/flow/ulogd_inpflow_NFCT.c | 13 | ||||
-rw-r--r-- | input/packet/ulogd_inppkt_NFLOG.c | 10 | ||||
-rw-r--r-- | input/packet/ulogd_inppkt_ULOG.c | 6 | ||||
-rw-r--r-- | input/packet/ulogd_inppkt_UNIXSOCK.c | 10 | ||||
-rw-r--r-- | output/pcap/ulogd_output_PCAP.c | 7 | ||||
-rw-r--r-- | output/ulogd_output_GRAPHITE.c | 8 | ||||
-rw-r--r-- | output/ulogd_output_LOGEMU.c | 8 | ||||
-rw-r--r-- | output/ulogd_output_NACCT.c | 13 | ||||
-rw-r--r-- | output/ulogd_output_XML.c | 15 |
10 files changed, 1 insertions, 99 deletions
diff --git a/filter/ulogd_filter_MARK.c b/filter/ulogd_filter_MARK.c index d5a8181..b977780 100644 --- a/filter/ulogd_filter_MARK.c +++ b/filter/ulogd_filter_MARK.c @@ -88,15 +88,6 @@ static int interp_mark(struct ulogd_pluginstance *pi) return ULOGD_IRET_OK; } -static int configure(struct ulogd_pluginstance *upi, - struct ulogd_pluginstance_stack *stack) -{ - ulogd_log(ULOGD_DEBUG, "parsing config file section `%s', " - "plugin `%s'\n", upi->id, upi->plugin->name); - - return ulogd_parse_configfile(upi->id, upi->config_kset); -} - static struct ulogd_plugin mark_pluging = { .name = "MARK", .input = { @@ -109,7 +100,6 @@ static struct ulogd_plugin mark_pluging = { }, .interp = &interp_mark, .config_kset = &libulog_kset, - .configure = &configure, .version = VERSION, }; diff --git a/input/flow/ulogd_inpflow_NFCT.c b/input/flow/ulogd_inpflow_NFCT.c index 5213cc3..93edb76 100644 --- a/input/flow/ulogd_inpflow_NFCT.c +++ b/input/flow/ulogd_inpflow_NFCT.c @@ -1049,18 +1049,6 @@ static void polling_timer_cb(struct ulogd_timer *t, void *data) ulogd_add_timer(&cpi->timer, pollint_ce(upi->config_kset).u.value); } -static int configure_nfct(struct ulogd_pluginstance *upi, - struct ulogd_pluginstance_stack *stack) -{ - int ret; - - ret = ulogd_parse_configfile(upi->id, upi->config_kset); - if (ret < 0) - return ret; - - return 0; -} - static void overrun_timeout(struct ulogd_timer *a, void *data) { int family = AF_UNSPEC; @@ -1577,7 +1565,6 @@ static struct ulogd_plugin nfct_plugin = { }, .config_kset = &nfct_kset, .interp = NULL, - .configure = &configure_nfct, .start = &constructor_nfct, .stop = &destructor_nfct, .signal = &signal_nfct, diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c index f716136..62b3963 100644 --- a/input/packet/ulogd_inppkt_NFLOG.c +++ b/input/packet/ulogd_inppkt_NFLOG.c @@ -551,15 +551,6 @@ release_ct: return ret; } -static int configure(struct ulogd_pluginstance *upi, - struct ulogd_pluginstance_stack *stack) -{ - ulogd_log(ULOGD_DEBUG, "parsing config file section `%s', " - "plugin `%s'\n", upi->id, upi->plugin->name); - - return ulogd_parse_configfile(upi->id, upi->config_kset); -} - static int become_system_logging(struct ulogd_pluginstance *upi, uint8_t pf) { struct nflog_input *ui = (struct nflog_input *) upi->private; @@ -723,7 +714,6 @@ struct ulogd_plugin libulog_plugin = { .num_keys = ARRAY_SIZE(output_keys), }, .priv_size = sizeof(struct nflog_input), - .configure = &configure, .start = &start, .stop = &stop, .config_kset = &libulog_kset, diff --git a/input/packet/ulogd_inppkt_ULOG.c b/input/packet/ulogd_inppkt_ULOG.c index 44bc71d..2eb994c 100644 --- a/input/packet/ulogd_inppkt_ULOG.c +++ b/input/packet/ulogd_inppkt_ULOG.c @@ -266,11 +266,6 @@ static int ulog_read_cb(int fd, unsigned int what, void *param) return 0; } -static int configure(struct ulogd_pluginstance *upi, - struct ulogd_pluginstance_stack *stack) -{ - return ulogd_parse_configfile(upi->id, upi->config_kset); -} static int init(struct ulogd_pluginstance *upi) { struct ulog_input *ui = (struct ulog_input *) &upi->private; @@ -325,7 +320,6 @@ struct ulogd_plugin libulog_plugin = { .keys = output_keys, .num_keys = ARRAY_SIZE(output_keys), }, - .configure = &configure, .start = &init, .stop = &fini, .config_kset = &libulog_kset, diff --git a/input/packet/ulogd_inppkt_UNIXSOCK.c b/input/packet/ulogd_inppkt_UNIXSOCK.c index b328500..0d9ba60 100644 --- a/input/packet/ulogd_inppkt_UNIXSOCK.c +++ b/input/packet/ulogd_inppkt_UNIXSOCK.c @@ -713,15 +713,6 @@ static int unixsock_server_read_cb(int fd, unsigned int what, void *param) return 0; } -static int configure(struct ulogd_pluginstance *upi, - struct ulogd_pluginstance_stack *stack) -{ - ulogd_log(ULOGD_DEBUG, "parsing config file section `%s', " - "plugin `%s'\n", upi->id, upi->plugin->name); - - return ulogd_parse_configfile(upi->id, upi->config_kset); -} - static int start(struct ulogd_pluginstance *upi) { struct unixsock_input *ui = (struct unixsock_input *) upi->private; @@ -809,7 +800,6 @@ struct ulogd_plugin libunixsock_plugin = { .num_keys = ARRAY_SIZE(output_keys), }, .priv_size = sizeof(struct unixsock_input), - .configure = &configure, .start = &start, .stop = &stop, .config_kset = &libunixsock_kset, diff --git a/output/pcap/ulogd_output_PCAP.c b/output/pcap/ulogd_output_PCAP.c index 474992e..ec29a9e 100644 --- a/output/pcap/ulogd_output_PCAP.c +++ b/output/pcap/ulogd_output_PCAP.c @@ -257,12 +257,6 @@ static void signal_pcap(struct ulogd_pluginstance *upi, int signal) } } -static int configure_pcap(struct ulogd_pluginstance *upi, - struct ulogd_pluginstance_stack *stack) -{ - return ulogd_parse_configfile(upi->id, upi->config_kset); -} - static int start_pcap(struct ulogd_pluginstance *upi) { return append_create_outfile(upi); @@ -291,7 +285,6 @@ static struct ulogd_plugin pcap_plugin = { .config_kset = &pcap_kset, .priv_size = sizeof(struct pcap_instance), - .configure = &configure_pcap, .start = &start_pcap, .stop = &stop_pcap, .signal = &signal_pcap, diff --git a/output/ulogd_output_GRAPHITE.c b/output/ulogd_output_GRAPHITE.c index e54b24d..6942123 100644 --- a/output/ulogd_output_GRAPHITE.c +++ b/output/ulogd_output_GRAPHITE.c @@ -210,13 +210,6 @@ static int fini_graphite(struct ulogd_pluginstance *pi) { return 0; } -static int configure_graphite(struct ulogd_pluginstance *pi, - struct ulogd_pluginstance_stack *stack) -{ - ulogd_log(ULOGD_DEBUG, "parsing config file section %s\n", pi->id); - return ulogd_parse_configfile(pi->id, pi->config_kset); -} - static struct ulogd_plugin graphite_plugin = { .name = "GRAPHITE", .input = { @@ -230,7 +223,6 @@ static struct ulogd_plugin graphite_plugin = { .config_kset = &graphite_kset, .priv_size = sizeof(struct graphite_instance), - .configure = &configure_graphite, .start = &start_graphite, .stop = &fini_graphite, diff --git a/output/ulogd_output_LOGEMU.c b/output/ulogd_output_LOGEMU.c index f5d1def..372cac3 100644 --- a/output/ulogd_output_LOGEMU.c +++ b/output/ulogd_output_LOGEMU.c @@ -174,13 +174,6 @@ static int fini_logemu(struct ulogd_pluginstance *pi) { return 0; } -static int configure_logemu(struct ulogd_pluginstance *pi, - struct ulogd_pluginstance_stack *stack) -{ - ulogd_log(ULOGD_DEBUG, "parsing config file section %s\n", pi->id); - return ulogd_parse_configfile(pi->id, pi->config_kset); -} - static struct ulogd_plugin logemu_plugin = { .name = "LOGEMU", .input = { @@ -194,7 +187,6 @@ static struct ulogd_plugin logemu_plugin = { .config_kset = &logemu_kset, .priv_size = sizeof(struct logemu_instance), - .configure = &configure_logemu, .start = &start_logemu, .stop = &fini_logemu, diff --git a/output/ulogd_output_NACCT.c b/output/ulogd_output_NACCT.c index 080a576..fa7c501 100644 --- a/output/ulogd_output_NACCT.c +++ b/output/ulogd_output_NACCT.c @@ -198,18 +198,6 @@ sighup_handler_print(struct ulogd_pluginstance *pi, int signal) } static int -nacct_conf(struct ulogd_pluginstance *pi, - struct ulogd_pluginstance_stack *stack) -{ - int ret; - - if ((ret = ulogd_parse_configfile(pi->id, pi->config_kset)) < 0) - return ret; - - return 0; -} - -static int nacct_init(struct ulogd_pluginstance *pi) { struct nacct_priv *op = (struct nacct_priv *)&pi->private; @@ -243,7 +231,6 @@ static struct ulogd_plugin nacct_plugin = { .output = { .type = ULOGD_DTYPE_SINK, }, - .configure = &nacct_conf, .interp = &nacct_interp, .start = &nacct_init, .stop = &nacct_fini, diff --git a/output/ulogd_output_XML.c b/output/ulogd_output_XML.c index 55c7a7c..0e1ae7b 100644 --- a/output/ulogd_output_XML.c +++ b/output/ulogd_output_XML.c @@ -185,18 +185,6 @@ static int xml_output(struct ulogd_pluginstance *upi) return ULOGD_IRET_OK; } -static int xml_configure(struct ulogd_pluginstance *upi, - struct ulogd_pluginstance_stack *stack) -{ - int ret; - - ret = ulogd_parse_configfile(upi->id, upi->config_kset); - if (ret < 0) - return ret; - - return 0; -} - static int xml_fini(struct ulogd_pluginstance *pi) { struct xml_priv *op = (struct xml_priv *) &pi->private; @@ -332,8 +320,7 @@ static struct ulogd_plugin xml_plugin = { }, .config_kset = &xml_kset, .priv_size = sizeof(struct xml_priv), - - .configure = &xml_configure, + .start = &xml_start, .stop = &xml_fini, .interp = &xml_output, |