if (s->system_journal) {
if (asprintf(&p, "/var/log/journal/%s", ids) < 0) {
- log_error("Out of memory.");
+ log_oom();
return;
}
if (s->runtime_journal) {
if (asprintf(&p, "/run/log/journal/%s", ids) < 0) {
- log_error("Out of memory.");
+ log_oom();
return;
}
assert(s);
assert(format);
- IOVEC_SET_STRING(iovec[n++], "PRIORITY=5");
+ IOVEC_SET_STRING(iovec[n++], "PRIORITY=6");
IOVEC_SET_STRING(iovec[n++], "_TRANSPORT=driver");
memcpy(buffer, "MESSAGE=", 8);
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_oom();
break;
}
k = malloc((e - p) + 1 + l);
if (!k) {
- log_error("Out of memory");
+ log_oom();
break;
}
p = malloc(st.st_size);
if (!p) {
- log_error("Out of memory");
+ log_oom();
return;
}
s->identifier = NULL;
else {
s->identifier = strdup(p);
- if (!s->identifier) {
- log_error("Out of memory");
- return -ENOMEM;
- }
+ if (!s->identifier)
+ return log_oom();
}
s->state = STDOUT_STREAM_UNIT_ID;
s->unit_id = NULL;
else {
s->unit_id = strdup(p);
- if (!s->unit_id) {
- log_error("Out of memory");
- return -ENOMEM;
- }
+ if (!s->unit_id)
+ return log_oom();
}
}
stream = new0(StdoutStream, 1);
if (!stream) {
- log_error("Out of memory.");
close_nointr_nofail(fd);
- return -ENOMEM;
+ return log_oom();
}
stream->fd = fd;
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);
return 1;
}
- log_debug("Received SIG%s", signal_to_string(sfsi.ssi_signo));
return 0;
} else if (ev->data.fd == s->proc_kmsg_fd) {
server_parse_proc_cmdline(s);
s->user_journals = hashmap_new(trivial_hash_func, trivial_compare_func);
- if (!s->user_journals) {
- log_error("Out of memory.");
- return -ENOMEM;
- }
+ if (!s->user_journals)
+ return log_oom();
s->epoll_fd = epoll_create1(EPOLL_CLOEXEC);
if (s->epoll_fd < 0) {