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.
This commit is contained in:
Lukas Nykryn 2014-08-25 15:29:50 +02:00
parent d74f9e8e8a
commit 41a451cc29

View file

@ -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;