summaryrefslogtreecommitdiffstats
path: root/src/journal/journalctl.h
blob: 2d86c169176abdc7ac93ed7a546d1d0df9f87446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once

#include <inttypes.h>
#include <stdbool.h>

#include "sd-id128.h"
#include "sd-json.h"

#include "output-mode.h"
#include "pager.h"
#include "pcre2-util.h"
#include "set.h"
#include "time-util.h"

typedef enum JournalctlAction {
        ACTION_SHOW,
        ACTION_NEW_ID128,
        ACTION_SETUP_KEYS,
        ACTION_LIST_CATALOG,
        ACTION_DUMP_CATALOG,
        ACTION_UPDATE_CATALOG,
        ACTION_PRINT_HEADER,
        ACTION_VERIFY,
        ACTION_DISK_USAGE,
        ACTION_LIST_BOOTS,
        ACTION_LIST_FIELDS,
        ACTION_LIST_FIELD_NAMES,
        ACTION_LIST_NAMESPACES,
        ACTION_FLUSH,
        ACTION_RELINQUISH_VAR,
        ACTION_SYNC,
        ACTION_ROTATE,
        ACTION_VACUUM,
        ACTION_ROTATE_AND_VACUUM,
} JournalctlAction;

extern JournalctlAction arg_action;
extern OutputMode arg_output;
extern sd_json_format_flags_t arg_json_format_flags;
extern PagerFlags arg_pager_flags;
extern bool arg_utc;
extern bool arg_follow;
extern bool arg_full;
extern bool arg_all;
extern int arg_lines;
extern bool arg_lines_oldest;
extern bool arg_no_tail;
extern bool arg_truncate_newline;
extern bool arg_quiet;
extern bool arg_merge;
extern bool arg_boot;
extern sd_id128_t arg_boot_id;
extern int arg_boot_offset;
extern bool arg_dmesg;
extern bool arg_no_hostname;
extern const char *arg_cursor;
extern const char *arg_cursor_file;
extern const char *arg_after_cursor;
extern bool arg_show_cursor;
extern const char *arg_directory;
extern char **arg_file;
extern bool arg_file_stdin;
extern int arg_priorities;
extern Set *arg_facilities;
extern char *arg_verify_key;
#if HAVE_GCRYPT
extern usec_t arg_interval;
extern bool arg_force;
#endif
extern usec_t arg_since;
extern usec_t arg_until;
extern bool arg_since_set;
extern bool arg_until_set;
extern char **arg_syslog_identifier;
extern char **arg_exclude_identifier;
extern char **arg_system_units;
extern char **arg_user_units;
extern const char *arg_field;
extern bool arg_catalog;
extern bool arg_reverse;
extern int arg_journal_type;
extern int arg_journal_additional_open_flags;
extern int arg_namespace_flags;
extern char *arg_root;
extern char *arg_image;
extern const char *arg_machine;
extern const char *arg_namespace;
extern uint64_t arg_vacuum_size;
extern uint64_t arg_vacuum_n_files;
extern usec_t arg_vacuum_time;
extern Set *arg_output_fields;
extern const char *arg_pattern;
extern pcre2_code *arg_compiled_pattern;
extern PatternCompileCase arg_case;

static inline bool arg_lines_needs_seek_end(void) {
        return arg_lines >= 0 && !arg_lines_oldest;
}