summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-08-25 15:29:50 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-08-25 15:51:55 +0200
commit41a451cc2901a5deb985aea4cc8de204a22e5612 (patch)
tree900a458a144f77f943048da06e25c06519994483 /src/shared/install.c
parentd74f9e8e8a3dcddb043ef193e4bb14f58efa095f (diff)
systemctl: fix broken list-unit-files with --root
This patch modifies unit_file_get_list which will now return hashmap of structures where f->path is *without* root_dir prefix. This change should be ok, because current code either does not use root_dir at all or calls basename() on the f->path.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 4b09a69456..a07d1dd315 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -2099,7 +2099,7 @@ int unit_file_get_list(
if (!f)
return -ENOMEM;
- f->path = path_make_absolute(de->d_name, units_dir);
+ f->path = path_make_absolute(de->d_name, *i);
if (!f->path)
return -ENOMEM;