style(9).
This commit is contained in:
parent
099894cc96
commit
ecb90dcc75
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142533
@ -230,11 +230,11 @@ DoFile(char *savedir, const char *device)
|
||||
struct kerneldumpheader kdhf, kdhl;
|
||||
off_t mediasize, dumpsize, firsthd, lasthd, dmpcnt;
|
||||
FILE *info, *fp;
|
||||
mode_t oumask;
|
||||
int fd, fdinfo, error, wl;
|
||||
int nr, nw, hs, he = 0;
|
||||
int bounds, status;
|
||||
u_int sectorsize;
|
||||
mode_t oumask;
|
||||
|
||||
bounds = getbounds();
|
||||
dmpcnt = 0;
|
||||
@ -431,7 +431,8 @@ DoFile(char *savedir, const char *device)
|
||||
for (nw = 0; nw < nr; nw = he) {
|
||||
/* find a contiguous block of zeroes */
|
||||
for (hs = nw; hs < nr; hs += BLOCKSIZE) {
|
||||
for (he = hs; he < nr && buf[he] == 0; ++he)
|
||||
for (he = hs; he < nr && buf[he] == 0;
|
||||
++he)
|
||||
/* nothing */ ;
|
||||
/* is the hole long enough to matter? */
|
||||
if (he >= hs + BLOCKSIZE)
|
||||
@ -457,7 +458,8 @@ DoFile(char *savedir, const char *device)
|
||||
* If he > hs, buf[hs..he] is all zeroes.
|
||||
*/
|
||||
if (hs > nw)
|
||||
if (fwrite(buf + nw, hs - nw, 1, fp) != 1)
|
||||
if (fwrite(buf + nw, hs - nw, 1, fp)
|
||||
!= 1)
|
||||
break;
|
||||
if (he > hs)
|
||||
if (fseeko(fp, he - hs, SEEK_CUR) == -1)
|
||||
@ -526,9 +528,9 @@ usage(void)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int i, ch, error;
|
||||
struct fstab *fsp;
|
||||
char *savedir;
|
||||
struct fstab *fsp;
|
||||
int i, ch, error;
|
||||
|
||||
checkfor = compress = clear = force = keep = verbose = 0;
|
||||
nfound = nsaved = nerr = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user