1
0
mirror of https://github.com/systemd/systemd synced 2025-10-03 18:54:45 +02:00

Compare commits

..

No commits in common. "db8b91980b9914564224fec1566f60c2961c6dc8" and "827ef318ec27a2c3c753614e89218b2a7d205937" have entirely different histories.

2 changed files with 15 additions and 18 deletions

View File

@ -172,7 +172,6 @@ static ssize_t request_reader_entries(
while (pos >= m->size) {
off_t sz;
bool wait_for_events = false;
/* End of this entry, so let's serialize the next
* one */
@ -193,10 +192,9 @@ static ssize_t request_reader_entries(
* from it are not returned. */
if (r < m->n_skip + 1) {
m->n_skip -= r;
if (!m->follow)
return MHD_CONTENT_READER_END_OF_STREAM;
wait_for_events = true;
if (m->follow)
return 0;
return MHD_CONTENT_READER_END_OF_STREAM;
}
} else
r = sd_journal_next(m->journal);
@ -205,21 +203,20 @@ static ssize_t request_reader_entries(
log_error_errno(r, "Failed to advance journal pointer: %m");
return MHD_CONTENT_READER_END_WITH_ERROR;
} else if (r == 0) {
if (!m->follow)
return MHD_CONTENT_READER_END_OF_STREAM;
wait_for_events = true;
}
if (wait_for_events) {
r = sd_journal_wait(m->journal, (uint64_t) JOURNAL_WAIT_TIMEOUT);
if (r < 0) {
log_error_errno(r, "Couldn't wait for journal event: %m");
return MHD_CONTENT_READER_END_WITH_ERROR;
if (m->follow) {
r = sd_journal_wait(m->journal, (uint64_t) JOURNAL_WAIT_TIMEOUT);
if (r < 0) {
log_error_errno(r, "Couldn't wait for journal event: %m");
return MHD_CONTENT_READER_END_WITH_ERROR;
}
if (r == SD_JOURNAL_NOP)
break;
continue;
}
if (r == SD_JOURNAL_NOP)
break;
continue;
return MHD_CONTENT_READER_END_OF_STREAM;
}
if (m->discrete) {

View File

@ -1184,7 +1184,7 @@ def pack_strings(strings: set[str], base: int) -> tuple[bytes, dict[str, int]]:
def parse_hwid_dir(path: Path) -> bytes:
hwid_files = sorted(path.rglob('*.json'))
hwid_files = path.rglob('*.json')
devstr_to_type: dict[str, int] = {
'devicetree': DEVICE_TYPE_DEVICETREE,
'uefi-fw': DEVICE_TYPE_UEFI_FW,