Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/fifolog/lib/fifolog_write_poll.c
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | fifolog_write_output(struct fifolog_writer *f, int fl, time_t now) | ||||
f->lastwrite = now; | f->lastwrite = now; | ||||
/* | /* | ||||
* We increment these even on error, so as to properly skip bad, | * We increment these even on error, so as to properly skip bad, | ||||
* sectors or other light trouble. | * sectors or other light trouble. | ||||
*/ | */ | ||||
f->seq++; | f->seq++; | ||||
f->recno++; | f->recno++; | ||||
/* | |||||
* Ensure we wrap recno once we hit the file size (in records.) | |||||
*/ | |||||
if (f->recno > f->ff->logsize) | |||||
/* recno 0 is header; skip */ | |||||
f->recno = 1; | |||||
allanjude: Is 'recno 1' actually f->recno = 0? or is this a typo and you meant f->recno=2? | |||||
Done Inline ActionsSorry yeah, comment is wrong. recno 0 is header. adrian: Sorry yeah, comment is wrong. recno 0 is header. | |||||
f->flag = 0; | f->flag = 0; | ||||
memset(f->obuf, 0, f->obufsize); | memset(f->obuf, 0, f->obufsize); | ||||
f->ff->zs->next_out = f->obuf + 5; | f->ff->zs->next_out = f->obuf + 5; | ||||
f->ff->zs->avail_out = f->obufsize - 5; | f->ff->zs->avail_out = f->obufsize - 5; | ||||
return (retval); | return (retval); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |
Is 'recno 1' actually f->recno = 0? or is this a typo and you meant f->recno=2?