diff options
author | Joe Thornber <thornber@redhat.com> | 2001-10-03 11:06:31 +0000 |
---|---|---|
committer | Joe Thornber <thornber@redhat.com> | 2001-10-03 11:06:31 +0000 |
commit | b8e4e502d30977f0c09f444ab5f780fc5da104a7 (patch) | |
tree | b7328a13f412237769e25d9d2d73b9fff27d3a3b /lib/log | |
parent | 9e300c8427eae36c0640636a01408932e1376cef (diff) | |
download | lvm2-b8e4e502d30977f0c09f444ab5f780fc5da104a7.tar.gz lvm2-b8e4e502d30977f0c09f444ab5f780fc5da104a7.tar.xz lvm2-b8e4e502d30977f0c09f444ab5f780fc5da104a7.zip |
o code sync for dev-cache.c
o made copyright headers the same
o added __attribute ((format ... to print_log so we'll get better compile errors
o added iterator to the hash table
Diffstat (limited to 'lib/log')
-rw-r--r-- | lib/log/log.c | 19 | ||||
-rw-r--r-- | lib/log/log.h | 26 |
2 files changed, 8 insertions, 37 deletions
diff --git a/lib/log/log.c b/lib/log/log.c index b2529097..cc92be5d 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -1,22 +1,7 @@ /* - * Copyright (C) 2001 Sistina Software - * - * - * This LVM library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This LVM library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this LVM library; if not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA + * Copyright (C) 2001 Sistina Software (UK) Limited. * + * This file is released under the GPL. */ #include "log.h" diff --git a/lib/log/log.h b/lib/log/log.h index 8d478f3d..4ece042c 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -1,21 +1,7 @@ /* - * Copyright (C) 2001 Sistina Software - * - * This LVM library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This LVM library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this LVM library; if not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA + * Copyright (C) 2001 Sistina Software (UK) Limited. * + * This file is released under the GPL. */ #ifndef _LVM_LOG_H @@ -31,7 +17,7 @@ #define _LOG_FATAL 2 void init_log(FILE *fp); -void fin_log(); +void fin_log(void); void init_syslog(int facility); void fin_syslog(void); @@ -43,7 +29,8 @@ void init_debug(int level); int test_mode(void); int debug_level(void); -void print_log(int level, const char *file, int line, const char *format, ...); +void print_log(int level, const char *file, int line, const char *format, ...) + __attribute__ (( format (printf, 4, 5) )); #define plog(l, x...) print_log(l, __FILE__, __LINE__ , ## x) @@ -58,7 +45,7 @@ void print_log(int level, const char *file, int line, const char *format, ...); #define stack log_debug( "stack trace" ) -/* +/* * Macros to use for messages: * * log_error - always print to stderr @@ -69,7 +56,6 @@ void print_log(int level, const char *file, int line, const char *format, ...); * * In addition, messages will be logged to file or syslog if they * are more serious than the log level specified with -d. - * */ #define log_error(fmt, args...) log_err(fmt , ## args) |