summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-list-unit-files.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-10 09:47:10 +0100
committerLennart Poettering <lennart@poettering.net>2023-03-10 09:47:39 +0100
commit4870133bfaaf97189a970a29bf47e0e38fa721aa (patch)
treed2fa9a5699a8b4c948179afabf3da2f9da322ce5 /src/systemctl/systemctl-list-unit-files.c
parentsocket-util: fix socket_get_family() (diff)
downloadsystemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.tar.xz
systemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.zip
basic: add RuntimeScope enum
In various tools and services we have a per-system and per-user concept. So far we sometimes used a boolean indicating whether we are in system mode, or a reversed boolean indicating whether we are in user mode, or the LookupScope enum used by the lookup path logic. Let's address that, in introduce a common enum for this, we can use all across the board. This is mostly just search/replace, no actual code changes.
Diffstat (limited to 'src/systemctl/systemctl-list-unit-files.c')
-rw-r--r--src/systemctl/systemctl-list-unit-files.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-list-unit-files.c b/src/systemctl/systemctl-list-unit-files.c
index 96b22041f4..72b377cde6 100644
--- a/src/systemctl/systemctl-list-unit-files.c
+++ b/src/systemctl/systemctl-list-unit-files.c
@@ -100,7 +100,7 @@ static int output_unit_file_list(const UnitFileList *units, unsigned c) {
if (show_preset_for_state(u->state)) {
const char *unit_preset_str, *on_preset_color;
- r = unit_file_query_preset(arg_scope, arg_root, id, &presets);
+ r = unit_file_query_preset(arg_runtime_scope, arg_root, id, &presets);
if (r < 0) {
unit_preset_str = "n/a";
on_preset_color = underline ? on_underline : ansi_normal();
@@ -151,7 +151,7 @@ int verb_list_unit_files(int argc, char *argv[], void *userdata) {
if (!h)
return log_oom();
- r = unit_file_get_list(arg_scope, arg_root, h, arg_states, strv_skip(argv, 1));
+ r = unit_file_get_list(arg_runtime_scope, arg_root, h, arg_states, strv_skip(argv, 1));
if (r < 0) {
unit_file_list_free(h);
return log_error_errno(r, "Failed to get unit file list: %m");