diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-02-17 10:38:12 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-02-17 19:29:24 +0100 |
commit | 93419a9601a0874a8304d0b6fe11a2f5c40c48b6 (patch) | |
tree | e3e6c6656c29ba04599082831d89f6d0ea23e07a /src/systemctl/systemctl-is-enabled.c | |
parent | test: avoid leaking open loop devices (diff) | |
download | systemd-93419a9601a0874a8304d0b6fe11a2f5c40c48b6.tar.xz systemd-93419a9601a0874a8304d0b6fe11a2f5c40c48b6.zip |
install: make UnitFileChangeType enum anonymous
We almost never use the named enum type, in almost all cases we use
"int" instead, since we overload it with negative errnos. To simplify
things, let's use "int" really everywhere.
Moreover, let's rename the fields for this enum to "type_or_errno", to
make the overloading clear. And let's ad some assertions that things are
in the right range.
Diffstat (limited to 'src/systemctl/systemctl-is-enabled.c')
-rw-r--r-- | src/systemctl/systemctl-is-enabled.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-is-enabled.c b/src/systemctl/systemctl-is-enabled.c index de1d016bb3..e33dffaf29 100644 --- a/src/systemctl/systemctl-is-enabled.c +++ b/src/systemctl/systemctl-is-enabled.c @@ -23,7 +23,7 @@ static int show_installation_targets_client_side(const char *name) { return log_error_errno(r, "Failed to get file links for %s: %m", name); for (size_t i = 0; i < n_changes; i++) - if (changes[i].type == UNIT_FILE_UNLINK) + if (changes[i].type_or_errno == UNIT_FILE_UNLINK) printf(" %s\n", changes[i].path); return 0; |