diff options
author | Rob Landley <rob@landley.net> | 2018-01-01 16:25:18 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-01-01 16:25:18 -0600 |
commit | 359888abf649ed3292210e3518aa669dac1480b9 (patch) | |
tree | 194c7ef19136c034f699d484908f472dadbef6b8 /lib | |
parent | 3ba0a289a8c77bc5f103520d8227c0f6695702fb (diff) | |
download | toybox-359888abf649ed3292210e3518aa669dac1480b9.tar.gz |
Cleanup logger.c, and move the facilitynames/prioritynames SYSLOG_NAMES
stuff syslog.h does into lib.c and portability.h
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lib.c | 1 | ||||
-rw-r--r-- | lib/portability.h | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -3,6 +3,7 @@ * Copyright 2006 Rob Landley <rob@landley.net> */ +#define SYSLOG_NAMES #include "toys.h" void verror_msg(char *msg, int err, va_list va) diff --git a/lib/portability.h b/lib/portability.h index e62de139..50c935b5 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -246,3 +246,8 @@ pid_t xfork(void); static inline int get_sched_policy(int tid, void *policy) {return 0;} static inline char *get_sched_policy_name(int policy) {return "unknown";} #endif + +#ifndef SYSLOG_NAMES +typedef struct {char *c_name; int c_val;} CODE; +extern CODE prioritynames[], facilitynames[]; +#endif |