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