summaryrefslogtreecommitdiff
path: root/src/shared/logs-show.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r--src/shared/logs-show.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index 697b5cf4b7..540b5a2a2c 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -557,7 +557,6 @@ int show_journal_by_unit(
char *m = NULL;
sd_journal *j = NULL;
int r;
- int fd;
unsigned line = 0;
bool need_seek = false;
@@ -583,10 +582,6 @@ int show_journal_by_unit(
if (r < 0)
goto finish;
- fd = sd_journal_get_fd(j);
- if (fd < 0)
- goto finish;
-
r = sd_journal_add_match(j, m, strlen(m));
if (r < 0)
goto finish;
@@ -663,11 +658,7 @@ int show_journal_by_unit(
if (!follow)
break;
- r = fd_wait_for_event(fd, POLLIN, (usec_t) -1);
- if (r < 0)
- goto finish;
-
- r = sd_journal_process(j);
+ r = sd_journal_wait(j, (usec_t) -1);
if (r < 0)
goto finish;