Compare commits

...

4 Commits

Author SHA1 Message Date
Daan De Meyer 922ae92aab
Merge ea8c6b4b80 into 7a9d0abe4d 2024-11-26 11:54:28 +01:00
Luca Boccassi 7a9d0abe4d Revert "man: use MIT-0 license for example codes in daemon(7)"
This reverts commit 6046cc3660.
2024-11-26 19:47:21 +09:00
Yu Watanabe 6046cc3660 man: use MIT-0 license for example codes in daemon(7)
This page contains many short example codes. I do not think we should
add SPDX-License-Identifier for all codes.

Closes #35356.
2024-11-26 11:12:08 +01:00
Daan De Meyer ea8c6b4b80 coredumpctl: Don't treat no coredumps as failure if JSON is enabled
Having to deal with a process that fails or doesn't fail depending on
whether there are coredumps or not is incredibly annoying for users.
So let's compromise and not fail if JSON output is enabled and there
are no coredumps.
2024-11-24 23:25:55 +01:00
2 changed files with 4 additions and 2 deletions

View File

@ -391,7 +391,7 @@
<title>Exit status</title> <title>Exit status</title>
<para>On success, 0 is returned; otherwise, a non-zero failure <para>On success, 0 is returned; otherwise, a non-zero failure
code is returned. Not finding any matching core dumps is treated as code is returned. Not finding any matching core dumps is treated as
failure. failure unless JSON output is enabled.
</para> </para>
</refsect1> </refsect1>

View File

@ -965,6 +965,8 @@ static int dump_list(int argc, char **argv, void *userdata) {
if (!arg_field && n_found <= 0) { if (!arg_field && n_found <= 0) {
if (!arg_quiet) if (!arg_quiet)
log_notice("No coredumps found."); log_notice("No coredumps found.");
if (!sd_json_format_enabled(arg_json_format_flags))
return -ESRCH; return -ESRCH;
} }
} }