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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user