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;
|
struct kerneldumpheader kdhf, kdhl;
|
||||||
off_t mediasize, dumpsize, firsthd, lasthd, dmpcnt;
|
off_t mediasize, dumpsize, firsthd, lasthd, dmpcnt;
|
||||||
FILE *info, *fp;
|
FILE *info, *fp;
|
||||||
|
mode_t oumask;
|
||||||
int fd, fdinfo, error, wl;
|
int fd, fdinfo, error, wl;
|
||||||
int nr, nw, hs, he = 0;
|
int nr, nw, hs, he = 0;
|
||||||
int bounds, status;
|
int bounds, status;
|
||||||
u_int sectorsize;
|
u_int sectorsize;
|
||||||
mode_t oumask;
|
|
||||||
|
|
||||||
bounds = getbounds();
|
bounds = getbounds();
|
||||||
dmpcnt = 0;
|
dmpcnt = 0;
|
||||||
@ -431,7 +431,8 @@ DoFile(char *savedir, const char *device)
|
|||||||
for (nw = 0; nw < nr; nw = he) {
|
for (nw = 0; nw < nr; nw = he) {
|
||||||
/* find a contiguous block of zeroes */
|
/* find a contiguous block of zeroes */
|
||||||
for (hs = nw; hs < nr; hs += BLOCKSIZE) {
|
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 */ ;
|
/* nothing */ ;
|
||||||
/* is the hole long enough to matter? */
|
/* is the hole long enough to matter? */
|
||||||
if (he >= hs + BLOCKSIZE)
|
if (he >= hs + BLOCKSIZE)
|
||||||
@ -457,7 +458,8 @@ DoFile(char *savedir, const char *device)
|
|||||||
* If he > hs, buf[hs..he] is all zeroes.
|
* If he > hs, buf[hs..he] is all zeroes.
|
||||||
*/
|
*/
|
||||||
if (hs > nw)
|
if (hs > nw)
|
||||||
if (fwrite(buf + nw, hs - nw, 1, fp) != 1)
|
if (fwrite(buf + nw, hs - nw, 1, fp)
|
||||||
|
!= 1)
|
||||||
break;
|
break;
|
||||||
if (he > hs)
|
if (he > hs)
|
||||||
if (fseeko(fp, he - hs, SEEK_CUR) == -1)
|
if (fseeko(fp, he - hs, SEEK_CUR) == -1)
|
||||||
@ -526,9 +528,9 @@ usage(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i, ch, error;
|
|
||||||
struct fstab *fsp;
|
|
||||||
char *savedir;
|
char *savedir;
|
||||||
|
struct fstab *fsp;
|
||||||
|
int i, ch, error;
|
||||||
|
|
||||||
checkfor = compress = clear = force = keep = verbose = 0;
|
checkfor = compress = clear = force = keep = verbose = 0;
|
||||||
nfound = nsaved = nerr = 0;
|
nfound = nsaved = nerr = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user