chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: gracefully handle failure to emit signals when dbus is not connected
[elogind.git]
/
src
/
journal-remote
/
journal-remote-parse.c
diff --git
a/src/journal-remote/journal-remote-parse.c
b/src/journal-remote/journal-remote-parse.c
index 224e8f140bd06d5d5ef7f781004cc93ea8a942b3..d9dea8deb0cbd58f9fd1dd70b5b7237f5edc0126 100644
(file)
--- a/
src/journal-remote/journal-remote-parse.c
+++ b/
src/journal-remote/journal-remote-parse.c
@@
-37,7
+37,7
@@
void source_free(RemoteSource *source) {
free(source->buf);
iovw_free_contents(&source->iovw);
free(source->buf);
iovw_free_contents(&source->iovw);
- log_debug("Writer ref count %
u
", source->writer->n_ref);
+ log_debug("Writer ref count %
i
", source->writer->n_ref);
writer_unref(source->writer);
sd_event_source_unref(source->event);
writer_unref(source->writer);
sd_event_source_unref(source->event);
@@
-125,8
+125,8
@@
static int get_line(RemoteSource *source, char **line, size_t *size) {
source->size - source->filled);
if (n < 0) {
if (errno != EAGAIN && errno != EWOULDBLOCK)
source->size - source->filled);
if (n < 0) {
if (errno != EAGAIN && errno != EWOULDBLOCK)
- log_error
("read(%d, ..., %zd
): %m", source->fd,
- source->size - source->filled);
+ log_error
_errno(errno, "read(%d, ..., %zu
): %m", source->fd,
+
source->size - source->filled);
return -errno;
} else if (n == 0)
return 0;
return -errno;
} else if (n == 0)
return 0;
@@
-186,8
+186,8
@@
static int fill_fixed_size(RemoteSource *source, void **data, size_t size) {
source->size - source->filled);
if (n < 0) {
if (errno != EAGAIN && errno != EWOULDBLOCK)
source->size - source->filled);
if (n < 0) {
if (errno != EAGAIN && errno != EWOULDBLOCK)
- log_error
("read(%d, ..., %zd
): %m", source->fd,
- source->size - source->filled);
+ log_error
_errno(errno, "read(%d, ..., %zu
): %m", source->fd,
+
source->size - source->filled);
return -errno;
} else if (n == 0)
return 0;
return -errno;
} else if (n == 0)
return 0;
@@
-330,7
+330,7
@@
int process_data(RemoteSource *source) {
assert(line[n-1] == '\n');
if (n == 1) {
assert(line[n-1] == '\n');
if (n == 1) {
- log_
debug
("Received empty line, event is ready");
+ log_
trace
("Received empty line, event is ready");
return 1;
}
return 1;
}
@@
-350,7
+350,7
@@
int process_data(RemoteSource *source) {
else
/* replace \n with = */
line[n-1] = '=';
else
/* replace \n with = */
line[n-1] = '=';
- log_
debug
("Received: %.*s", (int) n, line);
+ log_
trace
("Received: %.*s", (int) n, line);
r = iovw_put(&source->iovw, line, n);
if (r < 0) {
r = iovw_put(&source->iovw, line, n);
if (r < 0) {
@@
-438,7
+438,7
@@
int process_source(RemoteSource *source, bool compress, bool seal) {
return r;
/* We have a full event */
return r;
/* We have a full event */
- log_
debug
("Received a full event from source@%p fd:%d (%s)",
+ log_
trace
("Received a full event from source@%p fd:%d (%s)",
source, source->fd, source->name);
if (!source->iovw.count) {
source, source->fd, source->name);
if (!source->iovw.count) {
@@
-451,8
+451,8
@@
int process_source(RemoteSource *source, bool compress, bool seal) {
r = writer_write(source->writer, &source->iovw, &source->ts, compress, seal);
if (r < 0)
r = writer_write(source->writer, &source->iovw, &source->ts, compress, seal);
if (r < 0)
- log_error
("Failed to write entry of %zu bytes: %s
",
-
iovw_size(&source->iovw), strerror(-r
));
+ log_error
_errno(r, "Failed to write entry of %zu bytes: %m
",
+
iovw_size(&source->iovw
));
else
r = 1;
else
r = 1;