author | Rich Felker <dalias@aerifal.cx> | 2024年07月05日 13:22:25 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024年07月05日 13:22:25 -0400 |
commit | dd1e63c3638d5f9afb857fccf6ce1415ca5f1b8b (patch) | |
tree | efce49a1ae163adba9efc35a88062031843b8f8b | |
parent | 008f737ddf5de815ef7e26d195767d927c8c8e76 (diff) | |
download | musl-dd1e63c3638d5f9afb857fccf6ce1415ca5f1b8b.tar.gz |
-rw-r--r-- | include/syslog.h | 4 | ||||
-rw-r--r-- | src/misc/syslog.c | 2 |
diff --git a/include/syslog.h b/include/syslog.h index 976fee09..57599e07 100644 --- a/include/syslog.h +++ b/include/syslog.h @@ -46,8 +46,8 @@ extern "C" { #define LOG_LOCAL7 (23<<3) #define LOG_NFACILITIES 24 -#define LOG_FACMASK 0xf8 -#define LOG_FAC(p) ((p)&LOG_FACMASK) +#define LOG_FACMASK 0x3f8 +#define LOG_FAC(p) (((p)&LOG_FACMASK)>>3) #define LOG_PID 0x01 #define LOG_CONS 0x02 diff --git a/src/misc/syslog.c b/src/misc/syslog.c index 3131c782..710202f9 100644 --- a/src/misc/syslog.c +++ b/src/misc/syslog.c @@ -128,7 +128,7 @@ static void _vsyslog(int priority, const char *message, va_list ap) static void __vsyslog(int priority, const char *message, va_list ap) { int cs; - if (!(log_mask & LOG_MASK(priority&7)) || (priority&~0xff)) return; + if (!(log_mask & LOG_MASK(priority&7)) || (priority&~0x3ff)) return; pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); LOCK(lock); _vsyslog(priority, message, ap); |