diff options
author | laforge <laforge> | 2003-09-28 15:19:25 +0000 |
---|---|---|
committer | laforge <laforge> | 2003-09-28 15:19:25 +0000 |
commit | da6345f7ce7090e24f2ba54a733245e138895878 (patch) | |
tree | 63f75e4f9dbd4fdbb518abdc8d9a25313658e081 /ulogd/extensions | |
parent | 9dfdf242dcaad16a5069ac95834eff8d60324058 (diff) |
new configuration file syntax (Magnus Boden)
Diffstat (limited to 'ulogd/extensions')
-rw-r--r-- | ulogd/extensions/ulogd_LOGEMU.c | 11 | ||||
-rw-r--r-- | ulogd/extensions/ulogd_OPRINT.c | 9 |
2 files changed, 9 insertions, 11 deletions
diff --git a/ulogd/extensions/ulogd_LOGEMU.c b/ulogd/extensions/ulogd_LOGEMU.c index b789c7a..ad8a3e6 100644 --- a/ulogd/extensions/ulogd_LOGEMU.c +++ b/ulogd/extensions/ulogd_LOGEMU.c @@ -1,4 +1,4 @@ -/* ulogd_LOGEMU.c, Version $Revision: 1.13 $ +/* ulogd_LOGEMU.c, Version $Revision: 1.14 $ * * ulogd output target for syslog logging emulation * @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: ulogd_LOGEMU.c,v 1.13 2003/08/23 11:47:09 laforge Exp $ + * $Id: ulogd_LOGEMU.c,v 1.14 2003/09/12 09:00:21 laforge Exp $ * */ @@ -52,11 +52,11 @@ ((unsigned char *)&addr)[2], \ ((unsigned char *)&addr)[3] -static config_entry_t syslogf_ce = { NULL, "syslogfile", CONFIG_TYPE_STRING, +static config_entry_t syslogf_ce = { NULL, "file", CONFIG_TYPE_STRING, CONFIG_OPT_NONE, 0, { string: ULOGD_LOGEMU_DEFAULT } }; -static config_entry_t syslsync_ce = { &syslogf_ce, "syslogsync", +static config_entry_t syslsync_ce = { &syslogf_ce, "sync", CONFIG_TYPE_INT, CONFIG_OPT_NONE, 0, { value: ULOGD_LOGEMU_SYNC_DEFAULT } }; @@ -305,8 +305,7 @@ static void _logemu_reg_op(void) void _init(void) { /* FIXME: error handling */ - config_register_key(&syslsync_ce); - config_parse_file(0); + config_parse_file("LOGEMU", &syslsync_ce); if (gethostname(hostname, sizeof(hostname)) < 0) { ulogd_log(ULOGD_FATAL, "can't gethostname(): %s\n", diff --git a/ulogd/extensions/ulogd_OPRINT.c b/ulogd/extensions/ulogd_OPRINT.c index 7ff5e76..fdee135 100644 --- a/ulogd/extensions/ulogd_OPRINT.c +++ b/ulogd/extensions/ulogd_OPRINT.c @@ -1,4 +1,4 @@ -/* ulogd_MAC.c, Version $Revision: 1.8 $ +/* ulogd_MAC.c, Version $Revision: 1.9 $ * * ulogd output target for logging to a file * @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: ulogd_OPRINT.c,v 1.8 2001/09/01 11:51:54 laforge Exp $ + * $Id: ulogd_OPRINT.c,v 1.9 2002/12/09 14:42:43 laforge Exp $ * */ @@ -79,7 +79,7 @@ int _output_print(ulog_iret_t *res) return 0; } -static config_entry_t outf_ce = { NULL, "dumpfile", CONFIG_TYPE_STRING, +static config_entry_t outf_ce = { NULL, "file", CONFIG_TYPE_STRING, CONFIG_OPT_NONE, 0, { string: ULOGD_OPRINT_DEFAULT } }; @@ -122,8 +122,7 @@ void _init(void) #ifdef DEBUG of = stdout; #else - config_register_key(&outf_ce); - config_parse_file(0); + config_parse_file("OPRINT", &outf_ce); of = fopen(outf_ce.u.string, "a"); if (!of) { |