[systemd-devel] [PATCH 1/3] ignore ENOENT from can_install in listing unit files
Dave Reisner
dreisner at archlinux.org
Sun Jul 1 16:37:50 PDT 2012
A broken .include link in a unit file will cause 'systemctl
list-unit-files' to simply return 'No such file or directory'. Ignore
this silly error, since we know that the file really does exist.
---
src/shared/install.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/install.c b/src/shared/install.c
index 13ae9a9..4bb91e2 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -1949,7 +1949,7 @@ int unit_file_get_list(
goto found;
r = unit_file_can_install(&paths, root_dir, f->path, true);
- if (r < 0) {
+ if (r < 0 && r != -ENOENT) {
free(f->path);
free(f);
goto finish;
--
1.7.11.1
More information about the systemd-devel
mailing list