diff options
author | 1996-12-04 01:41:51 +0000 | |
---|---|---|
committer | 1996-12-04 01:41:51 +0000 | |
commit | d739c1229f379dce5afbde92519d704fd6ba894d (patch) | |
tree | f5346dfbfe09b264c98aac8ce5b42bc98c89673e | |
parent | use readlabelfs() if possible (diff) | |
download | wireguard-openbsd-d739c1229f379dce5afbde92519d704fd6ba894d.tar.xz wireguard-openbsd-d739c1229f379dce5afbde92519d704fd6ba894d.zip |
64 bit patches, tih@nhh.no
-rw-r--r-- | include/protocols/dumprestore.h | 18 | ||||
-rw-r--r-- | sbin/dump/traverse.c | 14 | ||||
-rw-r--r-- | sbin/restore/dirs.c | 12 | ||||
-rw-r--r-- | sbin/restore/symtab.c | 14 | ||||
-rw-r--r-- | sbin/restore/tape.c | 44 |
5 files changed, 51 insertions, 51 deletions
diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h index bc014cefaa4..dab890c0f43 100644 --- a/include/protocols/dumprestore.h +++ b/include/protocols/dumprestore.h @@ -69,25 +69,25 @@ union u_spcl { char dummy[TP_BSIZE]; struct s_spcl { - long c_type; /* record type (see below) */ + int32_t c_type; /* record type (see below) */ time_t c_date; /* date of this dump */ time_t c_ddate; /* date of previous dump */ - long c_volume; /* dump volume number */ + int32_t c_volume; /* dump volume number */ daddr_t c_tapea; /* logical block of this record */ ino_t c_inumber; /* number of inode */ - long c_magic; /* magic number (see above) */ - long c_checksum; /* record checksum */ + int32_t c_magic; /* magic number (see above) */ + int32_t c_checksum; /* record checksum */ struct dinode c_dinode; /* ownership and mode of inode */ - long c_count; /* number of valid c_addr entries */ + int32_t c_count; /* number of valid c_addr entries */ char c_addr[TP_NINDIR]; /* 1 => data; 0 => hole in inode */ char c_label[LBLSIZE]; /* dump label */ - long c_level; /* level of this dump */ + int32_t c_level; /* level of this dump */ char c_filesys[NAMELEN]; /* name of dumpped file system */ char c_dev[NAMELEN]; /* name of dumpped device */ char c_host[NAMELEN]; /* name of dumpped host */ - long c_flags; /* additional information */ - long c_firstrec; /* first record on volume */ - long c_spare[32]; /* reserved for future uses */ + int32_t c_flags; /* additional information */ + int32_t c_firstrec; /* first record on volume */ + int32_t c_spare[32]; /* reserved for future uses */ } s_spcl; } u_spcl; #define spcl u_spcl.s_spcl diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 0f23d9c81fa..185417bdf99 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -1,5 +1,5 @@ -/* $OpenBSD: traverse.c,v 1.2 1996/06/23 14:30:13 deraadt Exp $ */ -/* $NetBSD: traverse.c,v 1.14 1995/06/18 21:35:33 cgd Exp $ */ +/* $OpenBSD: traverse.c,v 1.3 1996/12/04 01:41:52 deraadt Exp $ */ +/* $NetBSD: traverse.c,v 1.15 1996/11/30 18:03:27 cgd Exp $ */ /*- * Copyright (c) 1980, 1988, 1991, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)traverse.c 8.2 (Berkeley) 9/23/93"; #else -static char rcsid[] = "$OpenBSD: traverse.c,v 1.2 1996/06/23 14:30:13 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: traverse.c,v 1.3 1996/12/04 01:41:52 deraadt Exp $"; #endif #endif /* not lint */ @@ -74,7 +74,7 @@ static char rcsid[] = "$OpenBSD: traverse.c,v 1.2 1996/06/23 14:30:13 deraadt Ex #ifdef FS_44INODEFMT typedef quad_t fsizeT; #else -typedef long fsizeT; +typedef int32_t fsizeT; #endif static int dirindir __P((ino_t ino, daddr_t blkno, int level, long *size)); @@ -508,14 +508,14 @@ void writeheader(ino) ino_t ino; { - register long sum, cnt, *lp; + register int32_t sum, cnt, *lp; spcl.c_inumber = ino; spcl.c_magic = NFS_MAGIC; spcl.c_checksum = 0; - lp = (long *)&spcl; + lp = (int32_t *)&spcl; sum = 0; - cnt = sizeof(union u_spcl) / (4 * sizeof(long)); + cnt = sizeof(union u_spcl) / (4 * sizeof(int32_t)); while (--cnt >= 0) { sum += *lp++; sum += *lp++; diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index e155582d840..f56c44c59c9 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dirs.c,v 1.8 1996/09/16 16:35:09 millert Exp $ */ +/* $OpenBSD: dirs.c,v 1.9 1996/12/04 01:41:53 deraadt Exp $ */ /* $NetBSD: dirs.c,v 1.16 1995/06/19 00:20:11 cgd Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)dirs.c 8.5 (Berkeley) 8/31/94"; #else -static char rcsid[] = "$OpenBSD: dirs.c,v 1.8 1996/09/16 16:35:09 millert Exp $"; +static char rcsid[] = "$OpenBSD: dirs.c,v 1.9 1996/12/04 01:41:53 deraadt Exp $"; #endif #endif /* not lint */ @@ -77,8 +77,8 @@ static char rcsid[] = "$OpenBSD: dirs.c,v 1.8 1996/09/16 16:35:09 millert Exp $" struct inotab { struct inotab *t_next; ino_t t_ino; - long t_seekpt; - long t_size; + int32_t t_seekpt; + int32_t t_size; }; static struct inotab *inotab[HASHSIZE]; @@ -101,8 +101,8 @@ struct modeinfo { #define DIRBLKSIZ 1024 struct rstdirdesc { int dd_fd; - long dd_loc; - long dd_size; + int32_t dd_loc; + int32_t dd_size; char dd_buf[DIRBLKSIZ]; }; diff --git a/sbin/restore/symtab.c b/sbin/restore/symtab.c index 2c33b7b8db6..21b6437402b 100644 --- a/sbin/restore/symtab.c +++ b/sbin/restore/symtab.c @@ -1,5 +1,5 @@ -/* $OpenBSD: symtab.c,v 1.2 1996/06/23 14:32:19 deraadt Exp $ */ -/* $NetBSD: symtab.c,v 1.8 1995/03/18 14:59:54 cgd Exp $ */ +/* $OpenBSD: symtab.c,v 1.3 1996/12/04 01:41:53 deraadt Exp $ */ +/* $NetBSD: symtab.c,v 1.9 1996/11/30 18:04:47 cgd Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)symtab.c 8.2 (Berkeley) 9/13/94"; #else -static char rcsid[] = "$OpenBSD: symtab.c,v 1.2 1996/06/23 14:32:19 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: symtab.c,v 1.3 1996/12/04 01:41:53 deraadt Exp $"; #endif #endif /* not lint */ @@ -440,13 +440,13 @@ freename(name) * Useful quantities placed at the end of a dumped symbol table. */ struct symtableheader { - long volno; - long stringsize; - long entrytblsize; + int32_t volno; + int32_t stringsize; + int32_t entrytblsize; time_t dumptime; time_t dumpdate; ino_t maxino; - long ntrec; + int32_t ntrec; }; /* diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c index 4be709de8c8..455c6852823 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -1,5 +1,5 @@ -/* $OpenBSD: tape.c,v 1.3 1996/09/01 15:27:29 deraadt Exp $ */ -/* $NetBSD: tape.c,v 1.20 1996/03/15 22:39:41 scottr Exp $ */ +/* $OpenBSD: tape.c,v 1.4 1996/12/04 01:41:54 deraadt Exp $ */ +/* $NetBSD: tape.c,v 1.22 1996/11/30 18:31:29 cgd Exp $ */ /* * Copyright (c) 1983, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.6 (Berkeley) 9/13/94"; #else -static char rcsid[] = "$NetBSD: tape.c,v 1.20 1996/03/15 22:39:41 scottr Exp $"; +static char rcsid[] = "$NetBSD: tape.c,v 1.22 1996/11/30 18:31:29 cgd Exp $"; #endif #endif /* not lint */ @@ -233,7 +233,7 @@ setup() fprintf(stderr, "cannot stat .: %s\n", strerror(errno)); exit(1); } - if (stbuf.st_blksize > 0 && stbuf.st_blksize <= MAXBSIZE) + if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE) fssize = stbuf.st_blksize; if (((fssize - 1) & fssize) != 0) { fprintf(stderr, "bad block size %d\n", fssize); @@ -999,32 +999,32 @@ gethead(buf) long i; union { quad_t qval; - long val[2]; + int32_t val[2]; } qcvt; union u_ospcl { char dummy[TP_BSIZE]; struct s_ospcl { - long c_type; - long c_date; - long c_ddate; - long c_volume; - long c_tapea; - u_short c_inumber; - long c_magic; - long c_checksum; + int32_t c_type; + int32_t c_date; + int32_t c_ddate; + int32_t c_volume; + int32_t c_tapea; + u_int16_t c_inumber; + int32_t c_magic; + int32_t c_checksum; struct odinode { unsigned short odi_mode; - u_short odi_nlink; - u_short odi_uid; - u_short odi_gid; - long odi_size; - long odi_rdev; + u_int16_t odi_nlink; + u_int16_t odi_uid; + u_int16_t odi_gid; + int32_t odi_size; + int32_t odi_rdev; char odi_addr[36]; - long odi_atime; - long odi_mtime; - long odi_ctime; + int32_t odi_atime; + int32_t odi_mtime; + int32_t odi_ctime; } c_dinode; - long c_count; + int32_t c_count; char c_addr[256]; } s_ospcl; } u_ospcl; |