From e02d1cf72d115d1d61defdca5b551672d876c6bd Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 10 Jul 2012 21:46:11 +0200 Subject: journal: introduce sd_journal_wait() to simplify writing synchronous clients --- src/shared/logs-show.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/shared') 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; -- cgit v1.2.3-54-g00ecf