diff options
author | rsc <devnull@localhost> | 2005-07-12 15:24:18 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-07-12 15:24:18 +0000 |
commit | be7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043 (patch) | |
tree | bf1d493c17a924df86dd05099caf4c07bc11c0d7 /man/man3/venti-zero.3 | |
parent | a0d146edd7a7de6236a0d60baafeeb59f8452aae (diff) | |
download | plan9port-be7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043.tar.gz plan9port-be7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043.tar.bz2 plan9port-be7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043.zip |
venti, now with documentation!
Diffstat (limited to 'man/man3/venti-zero.3')
-rw-r--r-- | man/man3/venti-zero.3 | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/man/man3/venti-zero.3 b/man/man3/venti-zero.3 new file mode 100644 index 00000000..c163b888 --- /dev/null +++ b/man/man3/venti-zero.3 @@ -0,0 +1,56 @@ +.TH VENTI-ZERO 3 +.SH NAME +vtzerotruncate, vtzeroextend, vtzeroscore \- Venti block truncation +.SH SYNOPSIS +.ft L +#include <u.h> +.br +#include <libc.h> +.br +#include <venti.h> +.ta +\w'\fLuint 'u +.PP +.B +uint vtzerotruncate(int type, uchar *buf, uint size) +.PP +.B +void vtzeroextend(int type, uchar *buf, uint size, uint newsize) +.PP +.B +extern uchar vtzeroscore[VtScoreSize]; +.SH DESCRIPTION +These utility functions compute how to truncate or replace +trailing zeros (for data blocks) or trailing zero scores +(for pointer blocks) to canonicalize the blocks before +storing them to Venti. +.PP +.I Vtzerotruncate +returns the size of the +.IR size -byte +buffer pointed to by +.I buf +ignoring trailing zeros or zero scores, +according to the block type +.IR type . +.PP +.I Vtzeroextend +pads +.I buf +with zeros or zero scores, +according to the block type +.IR type , +to grow it from +.I size +bytes to +.I newsize +bytes. +.PP +.I Vtzeroscore +is the score of the zero-length block. +.SH SOURCE +.B \*9/src/libventi/zero.c +.br +.B \*9/src/libventi/zeroscore.c +.SH SEE ALSO +.IR venti (1), +.IR venti (3) |