#include "protectcorrectfile.h"
#include "options.h"
#include "header.h"
#include "footprint.h"
#include "hyperblkcodec.h"
#include <sys/stat.h>
#include <assert.h>
Include dependency graph for protectcorrectfile.cc:
Go to the source code of this file.
Functions | |
long | interleaveskip (const long len, const long stripenum) |
Calculate distance to next block for file striping Filelength len (in blocks), at least stripenum stripes. | |
char * | readandinterleave (int fblocks, int stripe, FILE *infile) |
read a file fil into buffer buf while interleaving it for better correction. | |
void | writeanddeinterleave (char *buf, int fblocks, int stripe, FILE *outfile) |
write a file from interleaved buffer. | |
void | protectfile () |
| |
bool | correctfile () |
correct the protectedfile to correctedfile returns true iff file is OK now. |
|
correct the protectedfile to correctedfile returns true iff file is OK now.
Definition at line 151 of file protectcorrectfile.cc. References blklen, correctedfname, eccfname, footprint(), footPrintDiff(), hbcorr, hblen, headerlen, hyperblockcorrect(), P, progname, protectedfname, readandinterleave(), readheader(), verbose, and writeanddeinterleave(). Referenced by main(). |
Here is the call graph for this function:
|
Calculate distance to next block for file striping Filelength len (in blocks), at least stripenum stripes.
Definition at line 17 of file protectcorrectfile.cc. Referenced by protectfile(). |
|
Definition at line 70 of file protectcorrectfile.cc. References addheaderitem(), blklen, eccfname, footprint(), hbcorr, hblen, hyperblockprotect(), interleaveskip(), P, protectedfname, readandinterleave(), verbose, writeanddeinterleave(), and writeheader(). Referenced by main(). |
Here is the call graph for this function:
|
read a file fil into buffer buf while interleaving it for better correction. returns buffer to read into fblocks: number of blklen char blocks in infile stripe: striping parameter Definition at line 35 of file protectcorrectfile.cc. References blklen, hblen, and progname. Referenced by correctfile(), and protectfile(). |
|
write a file from interleaved buffer. Inverse of readandinterleave. fblocks: number of blklen char blocks in infile stripe: striping parameter outfile: file to write to Definition at line 59 of file protectcorrectfile.cc. References blklen. Referenced by correctfile(), and protectfile(). |