1
0
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:
Djalal Harouni 2017-03-06 17:25:40 +01:00 committed by GitHub
commit 81687ee338
2 changed files with 3 additions and 2 deletions

View File

@ -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');

View File

@ -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;
}