]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/logs-show.h
util: rework rm_rf() logic
[thirdparty/systemd.git] / src / shared / logs-show.h
CommitLineData
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 25#include <sys/types.h>
86aa7ba4 26
3c756001 27#include "sd-journal.h"
81527be1 28
86aa7ba4 29#include "util.h"
9bdbc2e2 30#include "output-mode.h"
25277cd7 31
08ace05b
LP
32int output_journal(
33 FILE *f,
34 sd_journal *j,
35 OutputMode mode,
36 unsigned n_columns,
94e0bd7d
ZJS
37 OutputFlags flags,
38 bool *ellipsized);
86aa7ba4 39
b6741478 40int add_match_this_boot(sd_journal *j, const char *machine);
5ec76417 41
886a64fe
ZJS
42int add_matches_for_unit(
43 sd_journal *j,
44 const char *unit);
45
46int add_matches_for_user_unit(
47 sd_journal *j,
df50185b 48 const char *unit,
886a64fe 49 uid_t uid);
df50185b 50
886a64fe 51int show_journal_by_unit(
1a6c43e9
MT
52 FILE *f,
53 const char *unit,
54 OutputMode mode,
55 unsigned n_columns,
56 usec_t not_before,
57 unsigned how_many,
58 uid_t uid,
886a64fe 59 OutputFlags flags,
3c756001
LP
60 int journal_open_flags,
61 bool system_unit,
94e0bd7d 62 bool *ellipsized);
1a6c43e9 63
240a5fe8
LP
64void json_escape(
65 FILE *f,
66 const char* p,
67 size_t l,
68 OutputFlags flags);
69
44a6b1b6
ZJS
70const char* output_mode_to_string(OutputMode m) _const_;
71OutputMode output_mode_from_string(const char *s) _pure_;