From d246bd965898f0ba6781f2b2048af9a5eba079d3 Mon Sep 17 00:00:00 2001 From: ajs Date: Tue, 23 Nov 2004 17:35:08 +0000 Subject: 2004-11-23 Andrew J. Schorr * log.c: (vzlog) Take a single va_list argument and use va_copy as necessary for multiple traversals. (zlog) Pass only one va_list to vzlog. (zlog_*,plog_*) Use a macro for boilerplate code; pass only one va_list to vzlog. (zlog_set_file) Remove unused 2nd argument (flags). (zlog_save_cwd,zlog_get_cwd,zlog_free_cwd) Remove unused functions. * log.h: Remove ZLOG_*_INDEX defines (no longer used). Remove unused 2nd argument from zlog_set_file prototype. Fix prototype for zlog_rotate. * command.c: (config_log_file) Remove unused 2nd arg to zlog_set_file. * vty.c: (vty_out) Fix stdarg usage to perform multiple traversals properly. (vty_log) Must use va_copy for multiple traversals of va_list arg. --- lib/log.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/log.h') diff --git a/lib/log.h b/lib/log.h index b5dbdfe1..e0437603 100644 --- a/lib/log.h +++ b/lib/log.h @@ -30,13 +30,6 @@ #define ZLOG_STDOUT 0x04 #define ZLOG_STDERR 0x08 -#define ZLOG_NOLOG_INDEX 0 -#define ZLOG_FILE_INDEX 1 -#define ZLOG_SYSLOG_INDEX 2 -#define ZLOG_STDOUT_INDEX 3 -#define ZLOG_STDERR_INDEX 4 -#define ZLOG_MAX_INDEX 5 - typedef enum { ZLOG_NONE, @@ -112,11 +105,11 @@ void zlog_set_flag (struct zlog *zl, int flags); void zlog_reset_flag (struct zlog *zl, int flags); /* Set zlog filename. */ -int zlog_set_file (struct zlog *zl, int flags, const char *filename); +int zlog_set_file (struct zlog *zl, const char *filename); int zlog_reset_file (struct zlog *zl); /* Rotate log. */ -int zlog_rotate (); +int zlog_rotate (struct zlog *); /* For hackey massage lookup and check */ #define LOOKUP(x, y) mes_lookup(x, x ## _max, y) -- cgit v1.2.1