summaryrefslogtreecommitdiffstats
path: root/src/path
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-23 19:50:59 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-27 20:12:44 +0100
commit51327bcc7457abb05cc80a5744fc233778a08ff8 (patch)
tree9484b2a5e460e4887a15509e62b19634dca07666 /src/path
parenttest-sd-path: basic test for the sd-path API (diff)
downloadsystemd-51327bcc7457abb05cc80a5744fc233778a08ff8.tar.xz
systemd-51327bcc7457abb05cc80a5744fc233778a08ff8.zip
sd-path: rename the two functions
I think the two names were both pretty bad. They did not give a proper hint what the difference between the two functions is, and sd_path_home sounds like it is somehow related to /home or home directories or whatever, when in fact both functions return the same set of paths as either a colon-delimited string or a strv. "_strv" suffix is used by various functions in sd-bus, so let's reuse that. Those functions are not public yet, so let's rename.
Diffstat (limited to 'src/path')
-rw-r--r--src/path/path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path/path.c b/src/path/path.c
index fa81632bb2..26252948c5 100644
--- a/src/path/path.c
+++ b/src/path/path.c
@@ -68,7 +68,7 @@ static int list_homes(void) {
_cleanup_free_ char *p = NULL;
int q;
- q = sd_path_home(i, arg_suffix, &p);
+ q = sd_path_lookup(i, arg_suffix, &p);
if (q == -ENXIO)
continue;
if (q < 0) {
@@ -91,7 +91,7 @@ static int print_home(const char *n) {
if (streq(path_table[i], n)) {
_cleanup_free_ char *p = NULL;
- r = sd_path_home(i, arg_suffix, &p);
+ r = sd_path_lookup(i, arg_suffix, &p);
if (r < 0)
return log_error_errno(r, "Failed to query %s: %m", n);