diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-17 16:25:06 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-19 08:02:29 +0200 |
commit | fddad5f4a66a68682892e3fa7f22ec2689786d33 (patch) | |
tree | dfd8b2ff5409ef8cf24f4d8b8e5d4de8236bc4ef /src/analyze/analyze-dump.c | |
parent | d5dcd00ba23e13b29bf9b8ad296f164a962825b5 (diff) | |
download | systemd-fddad5f4a66a68682892e3fa7f22ec2689786d33.tar.gz |
analyze: allow verbs to return positive failure
No functional change is intended. The verbs where it wasn't immediately
clear if the success exit status is 0 or >= 0 are changed to explicitly
return 0. (I think it's better to be explicit than to rely on some call
stack always returning 0 on success.)
Some other functions are cleaned up to be more idiomatic.
Diffstat (limited to 'src/analyze/analyze-dump.c')
-rw-r--r-- | src/analyze/analyze-dump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/analyze/analyze-dump.c b/src/analyze/analyze-dump.c index 24094ce614..448ce09bd7 100644 --- a/src/analyze/analyze-dump.c +++ b/src/analyze/analyze-dump.c @@ -60,5 +60,9 @@ int verb_dump(int argc, char *argv[], void *userdata) { return bus_log_parse_error(r); fflush(stdout); - return copy_bytes(fd, STDOUT_FILENO, UINT64_MAX, 0); + r = copy_bytes(fd, STDOUT_FILENO, UINT64_MAX, 0); + if (r < 0) + return r; + + return EXIT_SUCCESS; } |