From 886a64fe6903bc1ccde5c7af0eac6786918c8e49 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 13 Mar 2013 19:30:05 -0400 Subject: logs-show: export logic to add matches for units After that functions which add matches, show_journal_by_unit and show_journal_by_user_unit, become nearly identical, so I merged them into one function. --- src/shared/logs-show.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/shared/logs-show.h') diff --git a/src/shared/logs-show.h b/src/shared/logs-show.h index a835112c99..5a4c9f24d7 100644 --- a/src/shared/logs-show.h +++ b/src/shared/logs-show.h @@ -37,16 +37,16 @@ int output_journal( unsigned n_columns, OutputFlags flags); -int show_journal_by_unit( - FILE *f, +int add_matches_for_unit( + sd_journal *j, + const char *unit); + +int add_matches_for_user_unit( + sd_journal *j, const char *unit, - OutputMode mode, - unsigned n_columns, - usec_t not_before, - unsigned how_many, - OutputFlags flags); + uid_t uid); -int show_journal_by_user_unit( +int show_journal_by_unit( FILE *f, const char *unit, OutputMode mode, @@ -54,7 +54,8 @@ int show_journal_by_user_unit( usec_t not_before, unsigned how_many, uid_t uid, - OutputFlags flags); + OutputFlags flags, + bool system); void json_escape( FILE *f, -- cgit v1.2.3-54-g00ecf