Systemd/src/systemctl
Giedrius Statkevičius eeb1542b5e systemctl: exit with 1 if no unit files found
Add a simple check on the number of unit files that were found: return
`-ENOENT` when none is found from the function and thus `systemctl`
consequently exits with `1` (`EXIT_FAILURE`) if none were found.

Verification:
```bash
root@image:~# systemctl list-unit-files dbus-nonexistant.service; echo
$?
UNIT FILE STATE VENDOR PRESET

0 unit files listed.
1
root@image:~# systemctl list-unit-files dbus.service; echo $?
UNIT FILE    STATE  VENDOR PRESET
dbus.service static enabled

1 unit files listed.
0
```

Fixes #15082.
2020-03-25 22:20:58 +02:00
..
systemctl.c systemctl: exit with 1 if no unit files found 2020-03-25 22:20:58 +02:00
systemd-sysv-install.SKELETON systemd-sysv-install: unset ROOT rather than setting it to "" 2018-02-27 19:59:09 +01:00
sysv-compat.c Merge pull request #12119 from keszybz/voidify-mkdir-p 2019-03-27 15:05:51 +01:00
sysv-compat.h systemctl: define less stuff when !HAVE_SYSV_COMPAT 2019-03-26 19:06:48 +01:00