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
-/* $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
#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 */
#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));
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++;
-/* $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 $ */
/*
#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 */
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];
#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];
};
-/* $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
#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 */
* 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;
};
/*
-/* $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
#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 */
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);
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;