X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Fjournald.c;h=ae1fbc4bd451952aa5660d58774be7f632de9a52;hp=18db31c3bc5218c89a60feff488901adc1f3732d;hb=669241a076108e0483d7d8475beaa506106d077e;hpb=4ca86bbc25540acc322679b98c4f18a540c100ee diff --git a/src/journal/journald.c b/src/journal/journald.c index 18db31c3b..ae1fbc4bd 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -1270,7 +1270,7 @@ static void process_native_message( u = MAX((n+N_IOVEC_META_FIELDS+1) * 2U, 4U); c = realloc(iovec, u * sizeof(struct iovec)); if (!c) { - log_error("Out of memory"); + log_error("Out of memory."); break; } @@ -1357,7 +1357,7 @@ static void process_native_message( k = malloc((e - p) + 1 + l); if (!k) { - log_error("Out of memory"); + log_error("Out of memory."); break; } @@ -1450,7 +1450,7 @@ static void process_native_file( p = malloc(st.st_size); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return; } @@ -1543,7 +1543,7 @@ static int stdout_stream_line(StdoutStream *s, char *p) { else { s->identifier = strdup(p); if (!s->identifier) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } @@ -1558,7 +1558,7 @@ static int stdout_stream_line(StdoutStream *s, char *p) { else { s->unit_id = strdup(p); if (!s->unit_id) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } } @@ -2147,11 +2147,8 @@ finish: journal_file_close(s->runtime_journal); s->runtime_journal = NULL; - if (r >= 0) { - char path[] = "/run/log/journal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; - sd_id128_to_string(machine, path + 17); - rm_rf(path, false, true, false); - } + if (r >= 0) + rm_rf("/run/log/journal", false, true, false); return r; } @@ -2228,6 +2225,8 @@ static int process_event(Server *s, struct epoll_event *ev) { return -errno; } + log_info("Received SIG%s", signal_to_string(sfsi.ssi_signo)); + if (sfsi.ssi_signo == SIGUSR1) { touch("/run/systemd/journal/flushed"); server_flush_to_var(s); @@ -2240,7 +2239,6 @@ static int process_event(Server *s, struct epoll_event *ev) { return 1; } - log_debug("Received SIG%s", signal_to_string(sfsi.ssi_signo)); return 0; } else if (ev->data.fd == s->proc_kmsg_fd) {