From 97b465b14297c2c7194fa40f473e5103ae167d27 Mon Sep 17 00:00:00 2001 From: Dima Ruban Date: Tue, 27 Oct 1998 04:01:19 +0000 Subject: [PATCH] 64bit fixes. (Note: ``dump'' doesn't work on alpha yet. Apparently there's a problem somewhere is the physio() area) Submitted by: myself && Matt Dillon. --- include/protocols/dumprestore.h | 18 +++++++++--------- sbin/dump/traverse.c | 8 ++++---- sbin/restore/dirs.c | 10 +++++----- sbin/restore/symtab.c | 10 +++++----- sbin/restore/tape.c | 30 +++++++++++++++--------------- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h index 72eddcd0f2da..9721082a900f 100644 --- a/include/protocols/dumprestore.h +++ b/include/protocols/dumprestore.h @@ -67,25 +67,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 952afc6a0bb3..555e948ceb7a 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: traverse.c,v 1.7 1998/06/15 06:58:12 charnier Exp $"; #endif /* not lint */ #include @@ -501,14 +501,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 15d7b067909e..db68d66a470d 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -41,7 +41,7 @@ static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: dirs.c,v 1.12 1998/07/28 06:20:05 charnier Exp $"; #endif /* not lint */ #include @@ -71,8 +71,8 @@ static const char rcsid[] = 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]; @@ -95,8 +95,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 f9a5422ab85b..795669ca74e6 100644 --- a/sbin/restore/symtab.c +++ b/sbin/restore/symtab.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)symtab.c 8.3 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: symtab.c,v 1.5 1998/07/28 06:20:13 charnier Exp $"; #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 03ddd15aa2bc..80a14a864e1a 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -41,7 +41,7 @@ static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$Id: tape.c,v 1.13 1998/07/28 06:20:15 charnier Exp $"; + "$Id: tape.c,v 1.14 1998/07/28 18:50:01 imp Exp $"; #endif /* not lint */ #include @@ -1009,32 +1009,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; + int32_t c_type; + int32_t c_date; + int32_t c_ddate; + int32_t c_volume; + int32_t c_tapea; u_short c_inumber; - long c_magic; - long c_checksum; + 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; + 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;