]> mj.ucw.cz Git - libucw.git/commitdiff
Logging: Use `uns' instead of `u32' to pass flags.
authorMartin Mares <mj@ucw.cz>
Fri, 13 Feb 2009 16:48:38 +0000 (17:48 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 13 Feb 2009 16:48:38 +0000 (17:48 +0100)
ucw/log-file.c
ucw/log-syslog.c
ucw/log.h

index a07f705fb4316659a43dc06d8276a0af330a75e5..98a4b8e2013298b89ff585e5ffad86e84a568a9a 100644 (file)
@@ -124,7 +124,7 @@ static void ls_fdfile_close(struct log_stream *ls)
 }
 
 /* handler for standard files */
-static int ls_fdfile_handler(struct log_stream* ls, const char *m, u32 cat UNUSED)
+static int ls_fdfile_handler(struct log_stream* ls, const char *m, uns cat UNUSED)
 {
   int len = strlen(m);
   int r = write(ls->idata, m, len);
index 9883f78987a04f0687fdbcfe06763bcd9fb4d06c..f92b616584910096d8e273258c80e00b96ecf1cc 100644 (file)
@@ -39,7 +39,7 @@ static int ls_syslog_convert_level(int level)
 }
 
 /* simple syslog write handler */
-static int ls_syslog_handler(struct log_stream *ls, const char *m, u32 flags)
+static int ls_syslog_handler(struct log_stream *ls, const char *m, uns flags)
 {
   int prio;
   ASSERT(ls);
index cbc018e9f179d2b3ac6f88960d5e81f7bb13f959..b336f2e79aa5200308136cc8c39cc479229f32ab 100644 (file)
--- a/ucw/log.h
+++ b/ucw/log.h
@@ -28,14 +28,14 @@ struct log_stream
   /* severity levels to accept - bitmask of (1<<LEVEL) */
   int levels;
   /* if filter returns nonzero, discard the message */
-  int (*filter)(struct log_stream* ls, const char *m, u32 cat);
+  int (*filter)(struct log_stream* ls, const char *m, uns cat);
   /* pass the message to these streams (simple-list of pointers) */
   struct clist substreams;
   /* what kind of string to format to pass to the handler (bitmask of LSFMT_xxx ) */
   int msgfmt;
   /* what to do to commit the message (ret 0 on success, nonzero on error)
    * msg is 0-term string, with desired info, one line, ending with "\n\0". */
-  int (*handler)(struct log_stream* ls, const char *m, u32 cat);
+  int (*handler)(struct log_stream* ls, const char *m, uns cat);
   /* close the log_stream file/connection */
   void (*close)(struct log_stream* ls);
 };
@@ -160,7 +160,7 @@ void ls_die(const char *fmt, ...);
 /* returns 1 in case of loop detection or other fatal error
  *         0 otherwise */
 int ls_passmsg(int depth, struct log_stream *ls, const char *stime, const char *sutime,
-    const char *msg, u32 cat);
+    const char *msg, uns cat);
 
 /* Maximal depth of ls_passmsg recursion */
 #define LS_MAX_DEPTH 64