X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=540b5a2a2cb3770416afea05745df470996c3846;hp=697b5cf4b734c58e848114e0b2ca45beec2670e5;hb=e02d1cf72d115d1d61defdca5b551672d876c6bd;hpb=166503dada92d7ca3570a653e07a51ed826b7c8a diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 697b5cf4b..540b5a2a2 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;