mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-03 08:41:47 +08:00
logcatd: fix sd_journal_seek_tail doesn't go to end (#23319)
* fix sd_journal_seek_tail doesn't go to end
* add comment
old-commit-hash: f2c17bbcde
This commit is contained in:
@@ -24,6 +24,10 @@ int main(int argc, char *argv[]) {
|
||||
err = sd_journal_seek_tail(journal);
|
||||
assert(err >= 0);
|
||||
|
||||
// workaround for bug https://github.com/systemd/systemd/issues/9934
|
||||
// call sd_journal_previous_skip after sd_journal_seek_tail (like journalctl -f does) to makes things work.
|
||||
sd_journal_previous_skip(journal, 1);
|
||||
|
||||
while (!do_exit) {
|
||||
err = sd_journal_next(journal);
|
||||
assert(err >= 0);
|
||||
|
||||
Reference in New Issue
Block a user