summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-22 03:57:15 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-22 04:02:07 +0100
commit3d7415f43f0fe6a821d7bc4a341ba371e8a30ef3 (patch)
treed79e54dec69645a894a4ec12d6abf765515d245f /src/journal
parentf4c135bf2f0abcf79c89efbeae51f03bacba5f2f (diff)
import: introduce new mini-daemon systemd-importd, and make machinectl a client to it
The old "systemd-import" binary is now an internal tool. We still use it as asynchronous backend for systemd-importd. Since the import tool might require some IO and CPU resources (due to qcow2 explosion, and decompression), and because we might want to run it with more minimal priviliges we still keep it around as the worker binary to execute as child process of importd. machinectl now has verbs for pulling down images, cancelling them and listing them.
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-syslog.c40
-rw-r--r--src/journal/journald-syslog.h1
2 files changed, 0 insertions, 41 deletions
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index 5d211323ad..21bc9679c2 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -238,46 +238,6 @@ size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid)
return e;
}
-void syslog_parse_priority(const char **p, int *priority, bool with_facility) {
- int a = 0, b = 0, c = 0;
- int k;
-
- assert(p);
- assert(*p);
- assert(priority);
-
- if ((*p)[0] != '<')
- return;
-
- if (!strchr(*p, '>'))
- return;
-
- if ((*p)[2] == '>') {
- c = undecchar((*p)[1]);
- k = 3;
- } else if ((*p)[3] == '>') {
- b = undecchar((*p)[1]);
- c = undecchar((*p)[2]);
- k = 4;
- } else if ((*p)[4] == '>') {
- a = undecchar((*p)[1]);
- b = undecchar((*p)[2]);
- c = undecchar((*p)[3]);
- k = 5;
- } else
- return;
-
- if (a < 0 || b < 0 || c < 0 ||
- (!with_facility && (a || b || c > 7)))
- return;
-
- if (with_facility)
- *priority = a*100 + b*10 + c;
- else
- *priority = (*priority & LOG_FACMASK) | c;
- *p += k;
-}
-
static void syslog_skip_date(char **buf) {
enum {
LETTER,
diff --git a/src/journal/journald-syslog.h b/src/journal/journald-syslog.h
index 25f89883f4..3774ebdf05 100644
--- a/src/journal/journald-syslog.h
+++ b/src/journal/journald-syslog.h
@@ -25,7 +25,6 @@
int syslog_fixup_facility(int priority) _const_;
-void syslog_parse_priority(const char **p, int *priority, bool with_facility);
size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid);
void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred, const struct timeval *tv);