ea8c6b4b80
7a9d0abe4d
This reverts commit 6046cc3660.
6046cc3660
This page contains many short example codes. I do not think we should add SPDX-License-Identifier for all codes. Closes #35356.
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.
@ -391,7 +391,7 @@
<title>Exit status</title>
<para>On success, 0 is returned; otherwise, a non-zero failure
code is returned. Not finding any matching core dumps is treated as
failure.
failure unless JSON output is enabled.
</para>
</refsect1>
@ -965,7 +965,9 @@ static int dump_list(int argc, char **argv, void *userdata) {
if (!arg_field && n_found <= 0) {
if (!arg_quiet)
log_notice("No coredumps found.");
return -ESRCH;
if (!sd_json_format_enabled(arg_json_format_flags))
}