chiark / gitweb /
systemctl: fail in the case that no unit files were found
authorLukas Nykryn <lnykryn@redhat.com>
Tue, 19 Aug 2014 18:53:29 +0000 (20:53 +0200)
committerLukas Nykryn <lnykryn@redhat.com>
Wed, 20 Aug 2014 08:45:18 +0000 (10:45 +0200)
commitfdbdf6ec29bda40763d7d3e7bb2a63e2f5d60c4c
tree545c0ead1e513664b15c4b897aa7db6959da4f06
parent5d0ae62c665262c4c55536457e84e278c252cc0b
systemctl: fail in the case that no unit files were found

Previously systemctl died with message

-bash-4.2# systemctl --root /rawhi list-unit-files
(src/systemctl/systemctl.c:868) Out of memory.

in the case that no unit files were found in the --root
or the directory did not exist.

So lets return ENOENT in the case that --root does not exist
and empty list in the case that there are no unit files.
src/shared/install.c
src/systemctl/systemctl.c