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