chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e512e8a
)
systemctl: fix broken list-unit-files with --root
author
Lukas Nykryn
<lnykryn@redhat.com>
Tue, 26 Aug 2014 11:33:08 +0000
(13:33 +0200)
committer
Lukas Nykryn
<lnykryn@redhat.com>
Wed, 27 Aug 2014 09:48:48 +0000
(11:48 +0200)
src/shared/install.c
patch
|
blob
|
history
diff --git
a/src/shared/install.c
b/src/shared/install.c
index 4b09a69456fd71fab4bf9c7bb113607d3747c9e2..3ef995a9285acd661ec22056810d93de97f230d8 100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-2072,6
+2072,7
@@
int unit_file_get_list(
for (;;) {
_cleanup_(unit_file_list_free_onep) UnitFileList *f = NULL;
struct dirent *de;
for (;;) {
_cleanup_(unit_file_list_free_onep) UnitFileList *f = NULL;
struct dirent *de;
+ _cleanup_free_ char *path = NULL;
errno = 0;
de = readdir(d);
errno = 0;
de = readdir(d);
@@
-2121,7
+2122,11
@@
int unit_file_get_list(
goto found;
}
goto found;
}
- r = unit_file_can_install(&paths, root_dir, f->path, true);
+ path = path_make_absolute(de->d_name, *i);
+ if (!path)
+ return -ENOMEM;
+
+ r = unit_file_can_install(&paths, root_dir, path, true);
if (r == -EINVAL || /* Invalid setting? */
r == -EBADMSG || /* Invalid format? */
r == -ENOENT /* Included file not found? */)
if (r == -EINVAL || /* Invalid setting? */
r == -EBADMSG || /* Invalid format? */
r == -ENOENT /* Included file not found? */)