mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
coredumpctl: Don't treat no coredumps as failure
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.
This commit is contained in:
@@ -389,10 +389,7 @@
|
||||
|
||||
<refsect1>
|
||||
<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.
|
||||
</para>
|
||||
<para>On success, 0 is returned; otherwise, a non-zero failure code is returned.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
||||
@@ -963,9 +963,10 @@ static int dump_list(int argc, char **argv, void *userdata) {
|
||||
}
|
||||
|
||||
if (!arg_field && n_found <= 0) {
|
||||
if (!arg_quiet)
|
||||
if (!arg_quiet && !sd_json_format_enabled(arg_json_format_flags))
|
||||
log_notice("No coredumps found.");
|
||||
return -ESRCH;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user