summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote-parse.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-03-13 13:51:55 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2015-03-13 14:10:35 +0100
commitff55c3c7327e6ad8ab139aef52d498386d4f4a72 (patch)
tree8c16231d56fd1ef483cec9cc1cbc405e0d81843d /src/journal-remote/journal-remote-parse.c
parentca2031fcc863fcdd4dd1594709918cb60cfd0e1b (diff)
journal-remote: stop using EWOULDBLOCK
There is no reason to ever use EWOULDBLOCK. It's equivalent to EAGAIN on all architectures on linux.
Diffstat (limited to 'src/journal-remote/journal-remote-parse.c')
-rw-r--r--src/journal-remote/journal-remote-parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
index 7e62954351..e08cbcc341 100644
--- a/src/journal-remote/journal-remote-parse.c
+++ b/src/journal-remote/journal-remote-parse.c
@@ -112,7 +112,7 @@ static int get_line(RemoteSource *source, char **line, size_t *size) {
if (source->passive_fd)
/* we have to wait for some data to come to us */
- return -EWOULDBLOCK;
+ return -EAGAIN;
if (source->size - source->filled < LINE_CHUNK &&
!realloc_buffer(source,
@@ -125,7 +125,7 @@ static int get_line(RemoteSource *source, char **line, size_t *size) {
n = read(source->fd, source->buf + source->filled,
source->size - source->filled);
if (n < 0) {
- if (errno != EAGAIN && errno != EWOULDBLOCK)
+ if (errno != EAGAIN)
log_error_errno(errno, "read(%d, ..., %zu): %m", source->fd,
source->size - source->filled);
return -errno;
@@ -178,7 +178,7 @@ static int fill_fixed_size(RemoteSource *source, void **data, size_t size) {
if (source->passive_fd)
/* we have to wait for some data to come to us */
- return -EWOULDBLOCK;
+ return -EAGAIN;
if (!realloc_buffer(source, source->offset + size))
return log_oom();
@@ -186,7 +186,7 @@ static int fill_fixed_size(RemoteSource *source, void **data, size_t size) {
n = read(source->fd, source->buf + source->filled,
source->size - source->filled);
if (n < 0) {
- if (errno != EAGAIN && errno != EWOULDBLOCK)
+ if (errno != EAGAIN)
log_error_errno(errno, "read(%d, ..., %zu): %m", source->fd,
source->size - source->filled);
return -errno;