chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: introduce sd_journal_wait() to simplify writing synchronous clients
[elogind.git]
/
src
/
shared
/
logs-show.c
diff --git
a/src/shared/logs-show.c
b/src/shared/logs-show.c
index 697b5cf4b734c58e848114e0b2ca45beec2670e5..540b5a2a2cb3770416afea05745df470996c3846 100644
(file)
--- 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;
char *m = NULL;
sd_journal *j = NULL;
int r;
- int fd;
unsigned line = 0;
bool need_seek = false;
unsigned line = 0;
bool need_seek = false;
@@
-583,10
+582,6
@@
int show_journal_by_unit(
if (r < 0)
goto finish;
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;
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;
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;
if (r < 0)
goto finish;