diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-17 07:35:07 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-17 17:20:58 +0200 |
commit | 085d71209ba32c1e4e72ec031536be892054352e (patch) | |
tree | 988bf6d68f4fdc147567d08e574a5a2d0ffa885f /src/shared/logs-show.c | |
parent | 25277cd7fbd77e4c8b20572570aa77c7da9abcc2 (diff) |
logs: Adapt interface in log-show.c (show_journal_by_unit)
Convert more flag arguments into one flag variable.
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r-- | src/shared/logs-show.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index af9bcbd0f7..bbfb74c2bd 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -553,15 +553,14 @@ int show_journal_by_unit( unsigned n_columns, usec_t not_before, unsigned how_many, - bool show_all, - bool follow, - bool warn_cutoff) { + OutputFlags flags) { char *m = NULL; sd_journal *j = NULL; int r; unsigned line = 0; bool need_seek = false; + int warn_cutoff = flags & OUTPUT_WARN_CUTOFF; assert(mode >= 0); assert(mode < _OUTPUT_MODE_MAX); @@ -633,8 +632,7 @@ int show_journal_by_unit( line ++; - r = output_journal(j, mode, line, n_columns, - show_all ? OUTPUT_SHOW_ALL : 0); + r = output_journal(j, mode, line, n_columns, flags); if (r < 0) goto finish; } @@ -659,7 +657,7 @@ int show_journal_by_unit( warn_cutoff = false; } - if (!follow) + if (!(flags & OUTPUT_FOLLOW)) break; r = sd_journal_wait(j, (usec_t) -1); |