]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl: split up humungous systemctl.c file 17279/head
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Oct 2020 09:27:56 +0000 (11:27 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Oct 2020 21:12:15 +0000 (23:12 +0200)
commitdaf71ef61ce0d60f378e20169fb8ab252f54d104
tree01968fc42d802652b13921ac6c14bf6d3f5b0728
parent4dcc0653b57a6930bcd88d0f91df47b996308112
systemctl: split up humungous systemctl.c file

This is just some refactoring: shifting around of code, not change in
codeflow.

This splits up the way too huge systemctl.c in multiple more easily
digestable files. It roughly follows the rule that each family of verbs
gets its own .c/.h file pair, and so do all the compat executable names
we support. Plus three extra files for sysv compat (which existed before
already, but I renamed slightly, to get the systemctl- prefix lik
everything else), a -util file with generic stuff everything uses, and a
-logind file with everything that talks directly to logind instead of
PID1.

systemctl is still a bit too complex for my taste, but I think this way
itc omes in a more digestable bits at least.

No change of behaviour, just reshuffling of some code.
72 files changed:
meson.build
src/systemctl/systemctl-add-dependency.c [new file with mode: 0644]
src/systemctl/systemctl-add-dependency.h [new file with mode: 0644]
src/systemctl/systemctl-cancel-job.c [new file with mode: 0644]
src/systemctl/systemctl-cancel-job.h [new file with mode: 0644]
src/systemctl/systemctl-clean-or-freeze.c [new file with mode: 0644]
src/systemctl/systemctl-clean-or-freeze.h [new file with mode: 0644]
src/systemctl/systemctl-compat-halt.c [new file with mode: 0644]
src/systemctl/systemctl-compat-halt.h [new file with mode: 0644]
src/systemctl/systemctl-compat-runlevel.c [new file with mode: 0644]
src/systemctl/systemctl-compat-runlevel.h [new file with mode: 0644]
src/systemctl/systemctl-compat-shutdown.c [new file with mode: 0644]
src/systemctl/systemctl-compat-shutdown.h [new file with mode: 0644]
src/systemctl/systemctl-compat-telinit.c [new file with mode: 0644]
src/systemctl/systemctl-compat-telinit.h [new file with mode: 0644]
src/systemctl/systemctl-daemon-reload.c [new file with mode: 0644]
src/systemctl/systemctl-daemon-reload.h [new file with mode: 0644]
src/systemctl/systemctl-edit.c [new file with mode: 0644]
src/systemctl/systemctl-edit.h [new file with mode: 0644]
src/systemctl/systemctl-enable.c [new file with mode: 0644]
src/systemctl/systemctl-enable.h [new file with mode: 0644]
src/systemctl/systemctl-is-active.c [new file with mode: 0644]
src/systemctl/systemctl-is-active.h [new file with mode: 0644]
src/systemctl/systemctl-is-enabled.c [new file with mode: 0644]
src/systemctl/systemctl-is-enabled.h [new file with mode: 0644]
src/systemctl/systemctl-is-system-running.c [new file with mode: 0644]
src/systemctl/systemctl-is-system-running.h [new file with mode: 0644]
src/systemctl/systemctl-kill.c [new file with mode: 0644]
src/systemctl/systemctl-kill.h [new file with mode: 0644]
src/systemctl/systemctl-list-dependencies.c [new file with mode: 0644]
src/systemctl/systemctl-list-dependencies.h [new file with mode: 0644]
src/systemctl/systemctl-list-jobs.c [new file with mode: 0644]
src/systemctl/systemctl-list-jobs.h [new file with mode: 0644]
src/systemctl/systemctl-list-machines.c [new file with mode: 0644]
src/systemctl/systemctl-list-machines.h [new file with mode: 0644]
src/systemctl/systemctl-list-unit-files.c [new file with mode: 0644]
src/systemctl/systemctl-list-unit-files.h [new file with mode: 0644]
src/systemctl/systemctl-list-units.c [new file with mode: 0644]
src/systemctl/systemctl-list-units.h [new file with mode: 0644]
src/systemctl/systemctl-log-setting.c [new file with mode: 0644]
src/systemctl/systemctl-log-setting.h [new file with mode: 0644]
src/systemctl/systemctl-logind.c [new file with mode: 0644]
src/systemctl/systemctl-logind.h [new file with mode: 0644]
src/systemctl/systemctl-preset-all.c [new file with mode: 0644]
src/systemctl/systemctl-preset-all.h [new file with mode: 0644]
src/systemctl/systemctl-reset-failed.c [new file with mode: 0644]
src/systemctl/systemctl-reset-failed.h [new file with mode: 0644]
src/systemctl/systemctl-service-watchdogs.c [new file with mode: 0644]
src/systemctl/systemctl-service-watchdogs.h [new file with mode: 0644]
src/systemctl/systemctl-set-default.c [new file with mode: 0644]
src/systemctl/systemctl-set-default.h [new file with mode: 0644]
src/systemctl/systemctl-set-environment.c [new file with mode: 0644]
src/systemctl/systemctl-set-environment.h [new file with mode: 0644]
src/systemctl/systemctl-set-property.c [new file with mode: 0644]
src/systemctl/systemctl-set-property.h [new file with mode: 0644]
src/systemctl/systemctl-show.c [new file with mode: 0644]
src/systemctl/systemctl-show.h [new file with mode: 0644]
src/systemctl/systemctl-start-special.c [new file with mode: 0644]
src/systemctl/systemctl-start-special.h [new file with mode: 0644]
src/systemctl/systemctl-start-unit.c [new file with mode: 0644]
src/systemctl/systemctl-start-unit.h [new file with mode: 0644]
src/systemctl/systemctl-switch-root.c [new file with mode: 0644]
src/systemctl/systemctl-switch-root.h [new file with mode: 0644]
src/systemctl/systemctl-sysv-compat.c [new file with mode: 0644]
src/systemctl/systemctl-sysv-compat.h [moved from src/systemctl/sysv-compat.h with 92% similarity]
src/systemctl/systemctl-trivial-method.c [new file with mode: 0644]
src/systemctl/systemctl-trivial-method.h [new file with mode: 0644]
src/systemctl/systemctl-util.c [new file with mode: 0644]
src/systemctl/systemctl-util.h [new file with mode: 0644]
src/systemctl/systemctl.c
src/systemctl/systemctl.h [new file with mode: 0644]
src/systemctl/sysv-compat.c [deleted file]