mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
Merge pull request #5540 from keszybz/coredump-eof-fix
coredump: fix handling of premature-eof for --backtrace
This commit is contained in:
commit
81687ee338
@ -314,7 +314,7 @@ int journal_importer_process_data(JournalImporter *imp) {
|
||||
return r;
|
||||
if (r == 0) {
|
||||
imp->state = IMPORTER_STATE_EOF;
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
assert(n > 0);
|
||||
assert(line[n-1] == '\n');
|
||||
|
@ -1326,7 +1326,8 @@ static int process_backtrace(int argc, char *argv[]) {
|
||||
log_error_errno(r, "Failed to parse journal entry on stdin: %m");
|
||||
goto finish;
|
||||
}
|
||||
if (r == 1)
|
||||
if (r == 1 || /* complete entry */
|
||||
journal_importer_eof(&importer)) /* end of data */
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user