summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl-edit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-02-21 16:30:45 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-22 14:15:07 +0100
commit32baf64d5ad131a1480a1ff9b3d47e32a33bc9d5 (patch)
treeab1753525c7506a29d5af148fd99f482c18e9519 /src/systemctl/systemctl-edit.c
parentc972880640ee19e89ce9265d8eae1b3aae190332 (diff)
downloadsystemd-32baf64d5ad131a1480a1ff9b3d47e32a33bc9d5.tar.gz
systemctl: systematically rename verb entrypoints verb_xyz()
Let's clean up our function naming a bit, and always name the verb_xyz(), where the xyz maps to the command line verb as closely as possible. No actual code changes, just an attempt to make the systemctl sources a bit more systematic, and less surprising.
Diffstat (limited to 'src/systemctl/systemctl-edit.c')
-rw-r--r--src/systemctl/systemctl-edit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
index b59a67ac22..4b19bf7015 100644
--- a/src/systemctl/systemctl-edit.c
+++ b/src/systemctl/systemctl-edit.c
@@ -22,7 +22,7 @@
#define EDIT_MARKER_START "### Anything between here and the comment below will become the new contents of the file"
#define EDIT_MARKER_END "### Lines below this comment will be discarded"
-int cat(int argc, char *argv[], void *userdata) {
+int verb_cat(int argc, char *argv[], void *userdata) {
_cleanup_(hashmap_freep) Hashmap *cached_name_map = NULL, *cached_id_map = NULL;
_cleanup_(lookup_paths_free) LookupPaths lp = {};
_cleanup_strv_free_ char **names = NULL;
@@ -497,7 +497,7 @@ static int trim_edit_markers(const char *path) {
return 0;
}
-int edit(int argc, char *argv[], void *userdata) {
+int verb_edit(int argc, char *argv[], void *userdata) {
_cleanup_(lookup_paths_free) LookupPaths lp = {};
_cleanup_strv_free_ char **names = NULL;
_cleanup_strv_free_ char **paths = NULL;
@@ -570,7 +570,7 @@ int edit(int argc, char *argv[], void *userdata) {
r = 0;
if (!arg_no_reload && !install_client_side())
- r = daemon_reload(argc, argv, userdata);
+ r = verb_daemon_reload(argc, argv, userdata);
end:
STRV_FOREACH_PAIR(original, tmp, paths) {