summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-09-14 12:45:43 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-09-14 22:32:20 +0200
commitc19c5aa5b33c72d051e4920994aa8fc257eac3ba (patch)
treeaea809bb374a87b04b31bfbd3dd49d7c6a322ec9 /src
parentpath: modernize, return first error (diff)
downloadsystemd-c19c5aa5b33c72d051e4920994aa8fc257eac3ba.tar.xz
systemd-c19c5aa5b33c72d051e4920994aa8fc257eac3ba.zip
path: rename functions
When this was originally added in 9a00f57a5ba7ed431e6bac8d8b36518708503b4e, the lookup function was called sd_path_home. But it was generalized a long time ago.
Diffstat (limited to 'src')
-rw-r--r--src/path/path.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/path/path.c b/src/path/path.c
index 4f9ab61fbd..a02047d110 100644
--- a/src/path/path.c
+++ b/src/path/path.c
@@ -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;
}