/src/systemd/src/systemctl/systemctl-util.h
Line | Count | Source |
1 | | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | | #pragma once |
3 | | |
4 | | #include "systemctl.h" |
5 | | |
6 | | typedef enum BusFocus { |
7 | | BUS_FULL, /* The full bus indicated via --system or --user */ |
8 | | BUS_MANAGER, /* The manager itself, possibly directly, possibly via the bus */ |
9 | | _BUS_FOCUS_MAX |
10 | | } BusFocus; |
11 | | |
12 | | int acquire_bus_full(BusFocus focus, bool graceful, sd_bus **ret); |
13 | 410 | static inline int acquire_bus(BusFocus focus, sd_bus **ret) { |
14 | 410 | return acquire_bus_full(focus, false, ret); |
15 | 410 | } Unexecuted instantiation: systemctl-compat-halt.c:acquire_bus Unexecuted instantiation: systemctl-daemon-reload.c:acquire_bus systemctl-logind.c:acquire_bus Line | Count | Source | 13 | 410 | static inline int acquire_bus(BusFocus focus, sd_bus **ret) { | 14 | 410 | return acquire_bus_full(focus, false, ret); | 15 | 410 | } |
Unexecuted instantiation: systemctl-start-unit.c:acquire_bus Unexecuted instantiation: systemctl-util.c:acquire_bus Unexecuted instantiation: fuzz-systemctl-parse-argv.c:acquire_bus |
16 | | void release_busses(void); |
17 | | |
18 | | void ask_password_agent_open_maybe(void); |
19 | | void polkit_agent_open_maybe(void); |
20 | | |
21 | | int translate_bus_error_to_exit_status(int r, const sd_bus_error *error); |
22 | | |
23 | | int get_state_one_unit(sd_bus *bus, const char *unit, UnitActiveState *ret_active_state); |
24 | | int get_sub_state_one_unit(sd_bus *bus, const char *unit, char **ret_sub_state); |
25 | | int get_unit_list(sd_bus *bus, const char *machine, char **patterns, UnitInfo **unit_infos, int c, sd_bus_message **ret_reply); |
26 | | int expand_unit_names(sd_bus *bus, char * const *names, const char* suffix, char ***ret, bool *ret_expanded); |
27 | | |
28 | | int get_active_triggering_units(sd_bus *bus, const char *unit, bool ignore_masked, char ***ret); |
29 | | void warn_triggering_units(sd_bus *bus, const char *unit, const char *operation, bool ignore_masked); |
30 | | |
31 | | int need_daemon_reload(sd_bus *bus, const char *unit); |
32 | | |
33 | | void warn_unit_file_changed(const char *unit); |
34 | | |
35 | | int append_unit_dependencies(sd_bus *bus, char **names, char ***ret); |
36 | | int maybe_extend_with_unit_dependencies(sd_bus *bus, char ***list); |
37 | | |
38 | | int unit_file_find_path(LookupPaths *lp, const char *unit_name, char **ret_unit_path); |
39 | | int unit_find_paths(sd_bus *bus, const char *unit_name, LookupPaths *lp, bool force_client_side, Hashmap **cached_id_map, Hashmap **cached_name_map, char **ret_fragment_path, char ***ret_dropin_paths); |
40 | | |
41 | | int unit_is_masked(sd_bus *bus, const char *unit); |
42 | | int unit_exists(LookupPaths *lp, const char *unit); |
43 | | |
44 | | int unit_get_dependencies(sd_bus *bus, const char *name, char ***ret); |
45 | | |
46 | | const char* unit_type_suffix(const char *unit); |
47 | | bool output_show_unit(const UnitInfo *u, char **patterns); |
48 | | |
49 | | bool install_client_side(void); |
50 | | |
51 | | int output_table(Table *table); |
52 | | |
53 | | bool show_preset_for_state(UnitFileState state); |
54 | | |
55 | | int mangle_names(const char *operation, char * const *original_names, char ***ret); |
56 | | |
57 | | UnitFileFlags unit_file_flags_from_args(void); |
58 | | |
59 | | int halt_now(enum action a); |
60 | | |
61 | | int get_unit_by_pid(sd_bus *bus, pid_t pid, char **ret_unit, char **ret_path); |
62 | | int lookup_unit_by_pidref(sd_bus *bus, pid_t pid, char **ret_unit, char **ret_path); |