From: Lukas Nykryn Date: Mon, 25 Aug 2014 13:29:50 +0000 (+0200) Subject: systemctl: fix broken list-unit-files with --root X-Git-Tag: v217~778 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41a451cc2901a5deb985aea4cc8de204a22e5612;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/shared/install.c b/src/shared/install.c index 4b09a69456f..a07d1dd3157 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;