]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
path: rename functions
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2023 10:45:43 +0000 (12:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2023 20:32:20 +0000 (22:32 +0200)
When this was originally added in 9a00f57a5ba7ed431e6bac8d8b36518708503b4e,
the lookup function was called sd_path_home. But it was generalized a long time
ago.

src/path/path.c

index 4f9ab61fbddff68c04572cea1aa9447c0aba535f..a02047d1107c107ae01b51e5e807f8f5a95208af 100644 (file)
@@ -101,7 +101,7 @@ static const char* const path_table[_SD_PATH_MAX] = {
         [SD_PATH_SYSTEMD_SEARCH_USER_ENVIRONMENT_GENERATOR]   = "systemd-search-user-environment-generator",
 };
 
-static int list_homes(void) {
+static int list_paths(void) {
         int r = 0;
 
         for (size_t i = 0; i < ELEMENTSOF(path_table); i++) {
@@ -123,7 +123,7 @@ static int list_homes(void) {
         return r;
 }
 
-static int print_home(const char *n) {
+static int print_path(const char *n) {
         int r;
 
         for (size_t i = 0; i < ELEMENTSOF(path_table); i++)
@@ -217,9 +217,9 @@ static int run(int argc, char* argv[]) {
 
         if (argc > optind)
                 for (int i = optind; i < argc; i++)
-                        RET_GATHER(r, print_home(argv[i]));
+                        RET_GATHER(r, print_path(argv[i]));
         else
-                r = list_homes();
+                r = list_paths();
 
         return r;
 }