summaryrefslogtreecommitdiffstats
path: root/ulogd/extensions
diff options
context:
space:
mode:
authorlaforge <laforge>2005-02-12 21:22:44 +0000
committerlaforge <laforge>2005-02-12 21:22:44 +0000
commitd055a18ee1d2298b72b4e4273401426b2226fd39 (patch)
treedbc812a762365eddee9030548a5910505a7cd9fb /ulogd/extensions
parent79a1049ec80e20c1607b7cc713f298c3cdbf57ba (diff)
use c99 initializers, move logefile parsing to correct function
Diffstat (limited to 'ulogd/extensions')
-rw-r--r--ulogd/extensions/ulogd_LOGEMU.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/ulogd/extensions/ulogd_LOGEMU.c b/ulogd/extensions/ulogd_LOGEMU.c
index 049bcd4..383f5a6 100644
--- a/ulogd/extensions/ulogd_LOGEMU.c
+++ b/ulogd/extensions/ulogd_LOGEMU.c
@@ -1,4 +1,4 @@
-/* ulogd_LOGEMU.c, Version $Revision: 1.15 $
+/* ulogd_LOGEMU.c, Version $Revision$
*
* ulogd output target for syslog logging emulation
*
@@ -46,14 +46,20 @@
((unsigned char *)&addr)[2], \
((unsigned char *)&addr)[3]
-static config_entry_t syslogf_ce = { NULL, "file", CONFIG_TYPE_STRING,
- CONFIG_OPT_NONE, 0,
- { string: ULOGD_LOGEMU_DEFAULT } };
+static config_entry_t syslogf_ce = {
+ .key = "file",
+ .type = CONFIG_TYPE_STRING,
+ .options = CONFIG_OPT_NONE,
+ .u.string = ULOGD_LOGEMU_DEFAULT
+};
-static config_entry_t syslsync_ce = { &syslogf_ce, "sync",
- CONFIG_TYPE_INT, CONFIG_OPT_NONE, 0,
- { value: ULOGD_LOGEMU_SYNC_DEFAULT }
- };
+static config_entry_t syslsync_ce = {
+ .next = &syslogf_ce,
+ .key = "sync",
+ .type = CONFIG_TYPE_INT,
+ .options = CONFIG_OPT_NONE,
+ .u.value = ULOGD_LOGEMU_SYNC_DEFAULT,
+};
static FILE *of = NULL;
@@ -91,6 +97,9 @@ static void signal_handler_logemu(int signal)
static int init_logemu(void) {
+ /* FIXME: error handling */
+ config_parse_file("LOGEMU", &syslsync_ce);
+
#ifdef DEBUG_LOGEMU
of = stdout;
#else
@@ -123,8 +132,5 @@ static ulog_output_t logemu_op = {
void _init(void)
{
- /* FIXME: error handling */
- config_parse_file("LOGEMU", &syslsync_ce);
-
register_output(&logemu_op);
}