diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-14 20:41:51 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-14 20:41:51 +0000 |
commit | 3f6200b6da6a1545561ffd050f9bd87b57b0b480 (patch) | |
tree | 93919f46d3198a7ac34c4b125293c96dfd218ada /sbin/dump/dump.h | |
parent | 664594592b027192aadee83827fa39d430c954d0 (diff) |
fix a few overflows by using off_t, not 32bit longs; some parts are from lucq.org; millert@ ok
Diffstat (limited to 'sbin/dump/dump.h')
-rw-r--r-- | sbin/dump/dump.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h index 75b68b8cb00..842d2617a73 100644 --- a/sbin/dump/dump.h +++ b/sbin/dump/dump.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.h,v 1.10 2002/02/17 19:42:27 millert Exp $ */ +/* $OpenBSD: dump.h,v 1.11 2002/03/14 20:41:50 mickey Exp $ */ /* $NetBSD: dump.h,v 1.11 1997/06/05 11:13:20 lukem Exp $ */ /*- @@ -72,10 +72,10 @@ int pipeout; /* true => output to standard output */ ino_t curino; /* current inumber; used globally */ int newtape; /* new tape flag */ int density; /* density in 0.1" units */ -u_int64_t tapesize; /* estimated tape size, blocks */ -long tsize; /* tape size in 0.1" units */ +off_t tapesize; /* estimated tape size, blocks */ +off_t tsize; /* tape size in 0.1" units */ int unlimited; /* if set, write to end of medium */ -long asize; /* number of 0.1" units written on current tape */ +off_t asize; /* number of 0.1" units written on current tape */ int etapes; /* estimated number of tapes */ int nonodump; /* if set, do not honor UF_NODUMP user flags */ @@ -103,11 +103,10 @@ void timeest(void); /* mapping routines */ struct dinode; -long blockest(struct dinode *dp); -void mapfileino(ino_t, u_int64_t *, int *); -int mapfiles(ino_t maxino, u_int64_t *tapesize, char *disk, - char * const *dirv); -int mapdirs(ino_t maxino, u_int64_t *tapesize); +off_t blockest(struct dinode *dp); +void mapfileino(ino_t, off_t *, int *); +int mapfiles(ino_t maxino, off_t *tapesize, char *disk, char * const *dirv); +int mapdirs(ino_t maxino, off_t *tapesize); /* file dumping routines */ void blksout(daddr_t *blkp, int frags, ino_t ino); |