* NM should pull in network.target, ntpd should pull in rtc-set.target.
+* bluetooth should be possible to disable
+
* fix alsa mixer restore to not print error when no config is stored
* ConditionDirectoryNotEmpty= needs to be documented
fprintf(f,
"%sSyslogFacility: %s\n"
"%sSyslogLevel: %s\n",
- prefix, log_facility_to_string(LOG_FAC(c->syslog_priority)),
+ prefix, log_facility_unshifted_to_string(c->syslog_priority >> 3),
prefix, log_level_to_string(LOG_PRI(c->syslog_priority)));
if (c->capabilities) {
assert(rvalue);
assert(data);
- if ((x = log_facility_from_string(rvalue)) < 0) {
+ if ((x = log_facility_unshifted_from_string(rvalue)) < 0) {
log_error("[%s:%u] Failed to parse log facility, ignoring: %s", filename, line, rvalue);
return 0;
}
- *o = LOG_MAKEPRI(x, LOG_PRI(*o));
+ *o = (x << 3) | LOG_PRI(*o);
return 0;
}
return 0;
}
- *o = LOG_MAKEPRI(LOG_FAC(*o), x);
+ *o = (*o & LOG_FACMASK) | x;
return 0;
}
return 0;
/* Patch in LOG_DAEMON facility if necessary */
- if (LOG_FAC(level) == 0)
- level = LOG_MAKEPRI(LOG_DAEMON, LOG_PRI(level));
+ if ((level & LOG_FACMASK) == 0)
+ level = LOG_DAEMON | LOG_PRI(level);
do {
char *e;
if (s->prefix)
parse_priority(&p, &priority);
- if (s->prefix &&
- p[0] == '<' &&
- p[1] >= '0' && p[1] <= '7' &&
- p[2] == '>') {
-
- /* Detected priority prefix */
- priority = LOG_MAKEPRI(LOG_FAC(priority), (p[1] - '0'));
-
- p += 3;
- }
-
if (*p == 0)
return 0;
/* Patch in LOG_USER facility if necessary */
- if (LOG_FAC(priority) == 0)
- priority = LOG_MAKEPRI(LOG_USER, LOG_PRI(priority));
+ if ((priority & LOG_FACMASK) == 0)
+ priority = LOG_USER | LOG_PRI(priority);
/*
* The format glibc uses to talk to the syslog daemon is:
DEFINE_STRING_TABLE_LOOKUP(sigchld_code, int);
-static const char *const log_facility_table[LOG_NFACILITIES] = {
+static const char *const log_facility_unshifted_table[LOG_NFACILITIES] = {
[LOG_FAC(LOG_KERN)] = "kern",
[LOG_FAC(LOG_USER)] = "user",
[LOG_FAC(LOG_MAIL)] = "mail",
[LOG_FAC(LOG_LOCAL7)] = "local7"
};
-DEFINE_STRING_TABLE_LOOKUP(log_facility, int);
+DEFINE_STRING_TABLE_LOOKUP(log_facility_unshifted, int);
static const char *const log_level_table[] = {
[LOG_EMERG] = "emerg",
const char *sigchld_code_to_string(int i);
int sigchld_code_from_string(const char *s);
-const char *log_facility_to_string(int i);
-int log_facility_from_string(const char *s);
+const char *log_facility_unshifted_to_string(int i);
+int log_facility_unshifted_from_string(const char *s);
const char *log_level_to_string(int i);
int log_level_from_string(const char *s);