diff options
author | phk <phk@FreeBSD.org> | 2011-02-28 09:11:46 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2011-02-28 09:11:46 +0000 |
commit | 851c06bea50a8a68cd5deef6502e4225b0b839eb (patch) | |
tree | 212135ab780c67433e2ccbc9da2af6b559a19e1d /usr.sbin/fifolog/fifolog_writer | |
parent | 91a0b8165f31621e8f1546e4ee2e58f9940c9ee6 (diff) | |
download | FreeBSD-src-851c06bea50a8a68cd5deef6502e4225b0b839eb.zip FreeBSD-src-851c06bea50a8a68cd5deef6502e4225b0b839eb.tar.gz |
Update fifolog internals to match main version:
Rename ...write_bytes... to ...write_records..., that's what they do.
Move writer .h stuff into writer private .h file.
Change logic in writer to support both fifolog usage in FreeBSD and
Measured usage better, by always using an input buffer.
Various cleanups.
Diffstat (limited to 'usr.sbin/fifolog/fifolog_writer')
-rw-r--r-- | usr.sbin/fifolog/fifolog_writer/fifolog_writer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c b/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c index 5c6aa68..77776b8 100644 --- a/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c +++ b/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c @@ -42,7 +42,8 @@ static void usage(void) { - fprintf(stderr, "Usage: fifolog_writer [-w write-rate] [-s sync-rate] " + fprintf(stderr, + "Usage: fifolog_writer [-w write-rate] [-s sync-rate] " "[-z compression] file\n"); exit(EX_USAGE); } @@ -105,10 +106,10 @@ main(int argc, char * const *argv) p--; *p = '\0'; if (*buf != '\0') - fifolog_write_bytes_poll(f, 0, 0, buf, 0); + fifolog_write_record_poll(f, 0, 0, buf, 0); } else if (i == 0) - (void)fifolog_write_poll(f, 0); + fifolog_write_poll(f, 0); } - (void)fifolog_write_flush(f); + fifolog_write_close(f); return (0); } |