1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

coredump: omit coredump info when -q is used with the debug verb

Skip printing the coredump info table when using the `debug` verb in
combination with the `-q/--quiet` option. Useful when trying to gather
coredump info non-interactively via scripted gdb commands.

Fixes: systemd/systemd#18935
This commit is contained in:
Frantisek Sumsal 2021-03-10 16:41:35 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 5acfe54e98
commit a174da59c2

View File

@ -1078,8 +1078,10 @@ static int run_debug(int argc, char **argv, void *userdata) {
if (r < 0)
return r;
print_info(stdout, j, false);
fputs("\n", stdout);
if (!arg_quiet) {
print_info(stdout, j, false);
fputs("\n", stdout);
}
r = sd_journal_get_data(j, "COREDUMP_EXE", (const void**) &data, &len);
if (r < 0)