Merge pull request #15191 from GiedriusS/feature/list-unit-files-return-1

systemctl: exit with 1 if no unit files found
This commit is contained in:
Anita Zhang 2020-03-25 16:50:30 -07:00 committed by GitHub
commit a22e8850a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1659,6 +1659,9 @@ static int list_unit_files(int argc, char *argv[], void *userdata) {
for (unit = units; unit < units + c; unit++)
free(unit->path);
if (c == 0)
return -ENOENT;
return 0;
}