]>
Commit | Line | Data |
---|---|---|
663996b3 MS |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
3 | #pragma once | |
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 | |
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 | |
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 | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
24 | #include <stdbool.h> | |
25 | #include <unistd.h> | |
26 | #include <sys/types.h> | |
27 | ||
5eef597e | 28 | #include "systemd/sd-journal.h" |
663996b3 MS |
29 | |
30 | #include "util.h" | |
31 | #include "output-mode.h" | |
32 | ||
33 | int output_journal( | |
34 | FILE *f, | |
35 | sd_journal *j, | |
36 | OutputMode mode, | |
37 | unsigned n_columns, | |
14228c0d MB |
38 | OutputFlags flags, |
39 | bool *ellipsized); | |
40 | ||
60f067b4 | 41 | int add_match_this_boot(sd_journal *j, const char *machine); |
663996b3 MS |
42 | |
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, | |
49 | const char *unit, | |
50 | uid_t uid); | |
51 | ||
52 | int show_journal_by_unit( | |
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, | |
60 | OutputFlags flags, | |
14228c0d MB |
61 | bool system, |
62 | bool *ellipsized); | |
663996b3 MS |
63 | |
64 | void json_escape( | |
65 | FILE *f, | |
66 | const char* p, | |
67 | size_t l, | |
68 | OutputFlags flags); | |
69 | ||
70 | const char* output_mode_to_string(OutputMode m) _const_; | |
71 | OutputMode output_mode_from_string(const char *s) _pure_; |