]>
Commit | Line | Data |
---|---|---|
86aa7ba4 LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
c2f1db8f | 3 | #pragma once |
86aa7ba4 LP |
4 | |
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2012 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
11 | under the terms of the GNU Lesser General Public License as published by |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
86aa7ba4 LP |
13 | (at your option) any later version. |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 18 | Lesser General Public License for more details. |
86aa7ba4 | 19 | |
5430f7f2 | 20 | You should have received a copy of the GNU Lesser General Public License |
86aa7ba4 LP |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
22 | ***/ | |
23 | ||
24 | #include <stdbool.h> | |
1a6c43e9 MT |
25 | #include <unistd.h> |
26 | #include <sys/types.h> | |
86aa7ba4 | 27 | |
3c756001 | 28 | #include "sd-journal.h" |
81527be1 | 29 | |
86aa7ba4 | 30 | #include "util.h" |
9bdbc2e2 | 31 | #include "output-mode.h" |
25277cd7 | 32 | |
08ace05b LP |
33 | int output_journal( |
34 | FILE *f, | |
35 | sd_journal *j, | |
36 | OutputMode mode, | |
37 | unsigned n_columns, | |
94e0bd7d ZJS |
38 | OutputFlags flags, |
39 | bool *ellipsized); | |
86aa7ba4 | 40 | |
b6741478 | 41 | int add_match_this_boot(sd_journal *j, const char *machine); |
5ec76417 | 42 | |
886a64fe ZJS |
43 | int add_matches_for_unit( |
44 | sd_journal *j, | |
45 | const char *unit); | |
46 | ||
47 | int add_matches_for_user_unit( | |
48 | sd_journal *j, | |
df50185b | 49 | const char *unit, |
886a64fe | 50 | uid_t uid); |
df50185b | 51 | |
886a64fe | 52 | int show_journal_by_unit( |
1a6c43e9 MT |
53 | FILE *f, |
54 | const char *unit, | |
55 | OutputMode mode, | |
56 | unsigned n_columns, | |
57 | usec_t not_before, | |
58 | unsigned how_many, | |
59 | uid_t uid, | |
886a64fe | 60 | OutputFlags flags, |
3c756001 LP |
61 | int journal_open_flags, |
62 | bool system_unit, | |
94e0bd7d | 63 | bool *ellipsized); |
1a6c43e9 | 64 | |
240a5fe8 LP |
65 | void json_escape( |
66 | FILE *f, | |
67 | const char* p, | |
68 | size_t l, | |
69 | OutputFlags flags); | |
70 | ||
44a6b1b6 ZJS |
71 | const char* output_mode_to_string(OutputMode m) _const_; |
72 | OutputMode output_mode_from_string(const char *s) _pure_; |