[OpenWrt-Devel] [PATCH procd] syslog: set sane priority values

Ulrich Weber uweber.linux at gmail.com
Wed Nov 4 10:33:11 EST 2015


otherwise LOG_USER/LOG_EMERG is used

Signed-off-by: Ulrich Weber <uw at ocedo.com>
---
 jail/seccomp.h | 2 +-
 rcS.c          | 2 +-
 trace/trace.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/jail/seccomp.h b/jail/seccomp.h
index c44a607..45eede7 100644
--- a/jail/seccomp.h
+++ b/jail/seccomp.h
@@ -12,7 +12,7 @@
  */
 
 #define INFO(fmt, ...) do { \
-	syslog(0,"preload-seccomp: "fmt, ## __VA_ARGS__); \
+	syslog(LOG_INFO,"preload-seccomp: "fmt, ## __VA_ARGS__); \
 	fprintf(stderr,"preload-seccomp: "fmt, ## __VA_ARGS__); \
 	} while (0)
 
diff --git a/rcS.c b/rcS.c
index b3e3c22..1e38d39 100644
--- a/rcS.c
+++ b/rcS.c
@@ -54,7 +54,7 @@ static void pipe_cb(struct ustream *s, int bytes)
 			break;
 		*newline = 0;
 		len = newline + 1 - str;
-		syslog(0, "%s", str);
+		syslog(LOG_NOTICE, "%s", str);
 #ifdef SHOW_BOOT_ON_CONSOLE
 		fprintf(stderr, "%s\n", str);
 #endif
diff --git a/trace/trace.c b/trace/trace.c
index 5941f90..b0005b8 100644
--- a/trace/trace.c
+++ b/trace/trace.c
@@ -53,7 +53,7 @@
 } while (0)
 
 #define ERROR(fmt, ...) do { \
-	syslog(0, "utrace: "fmt, ## __VA_ARGS__); \
+	syslog(LOG_ERR, "utrace: "fmt, ## __VA_ARGS__); \
 	fprintf(stderr, "utrace: "fmt, ## __VA_ARGS__); \
 } while (0)
 
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list