summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/badsect/badsect.c14
-rw-r--r--sbin/disklabel/disklabel.c6
-rw-r--r--sbin/disklabel/editor.c16
-rw-r--r--sbin/dump/dump.h8
-rw-r--r--sbin/dump/tape.c10
-rw-r--r--sbin/dump/traverse.c20
-rw-r--r--sbin/fdisk/mbr.c4
-rw-r--r--sbin/fsck_ffs/dir.c8
-rw-r--r--sbin/fsck_ffs/extern.h12
-rw-r--r--sbin/fsck_ffs/fsck.h22
-rw-r--r--sbin/fsck_ffs/inode.c12
-rw-r--r--sbin/fsck_ffs/main.c4
-rw-r--r--sbin/fsck_ffs/pass1.c14
-rw-r--r--sbin/fsck_ffs/pass1b.c4
-rw-r--r--sbin/fsck_ffs/pass2.c4
-rw-r--r--sbin/fsck_ffs/pass4.c4
-rw-r--r--sbin/fsck_ffs/pass5.c6
-rw-r--r--sbin/fsck_ffs/setup.c4
-rw-r--r--sbin/fsck_ffs/utilities.c18
-rw-r--r--sbin/fsdb/fsdb.h8
-rw-r--r--sbin/fsirand/fsirand.c4
-rw-r--r--sbin/growfs/debug.c14
-rw-r--r--sbin/growfs/growfs.c68
-rw-r--r--sbin/ncheck_ffs/ncheck_ffs.c16
-rw-r--r--sbin/newfs/mkfs.c24
-rw-r--r--sbin/newfs/newfs.c12
-rw-r--r--sbin/quotacheck/quotacheck.c8
-rw-r--r--sbin/scan_ffs/scan_ffs.c8
-rw-r--r--sbin/tunefs/tunefs.c10
29 files changed, 181 insertions, 181 deletions
diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c
index 5a61c3cc099..4c9f54b87bd 100644
--- a/sbin/badsect/badsect.c
+++ b/sbin/badsect/badsect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: badsect.c,v 1.20 2013/06/02 06:22:29 guenther Exp $ */
+/* $OpenBSD: badsect.c,v 1.21 2013/06/11 16:42:02 deraadt Exp $ */
/* $NetBSD: badsect.c,v 1.10 1995/03/18 14:54:28 cgd Exp $ */
/*
@@ -55,8 +55,8 @@
#include <unistd.h>
#include <err.h>
-static int chkuse(daddr64_t, int);
-static void rdfs(daddr64_t, int, char *);
+static int chkuse(daddr_t, int);
+static void rdfs(daddr_t, int, char *);
static union {
struct fs fs;
@@ -76,7 +76,7 @@ static long dev_bsize = 1;
int
main(int argc, char *argv[])
{
- daddr64_t number;
+ daddr_t number;
struct stat stbuf, devstat;
struct dirent *dp;
DIR *dirp;
@@ -140,10 +140,10 @@ main(int argc, char *argv[])
}
static int
-chkuse(daddr64_t blkno, int cnt)
+chkuse(daddr_t blkno, int cnt)
{
int cg;
- daddr64_t fsbn, bn;
+ daddr_t fsbn, bn;
fsbn = dbtofsb(fs, blkno);
if (fsbn+cnt > fs->fs_ffs1_size) {
@@ -181,7 +181,7 @@ chkuse(daddr64_t blkno, int cnt)
* read a block from the file system
*/
static void
-rdfs(daddr64_t bno, int size, char *bf)
+rdfs(daddr_t bno, int size, char *bf)
{
int n;
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index a5f976ea78b..07e3f2cc731 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.185 2012/04/06 18:20:35 deraadt Exp $ */
+/* $OpenBSD: disklabel.c,v 1.186 2013/06/11 16:42:04 deraadt Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -716,7 +716,7 @@ char
canonical_unit(struct disklabel *lp, char unit)
{
struct partition *pp;
- daddr64_t small;
+ daddr_t small;
int i;
if (unit == '*') {
@@ -1377,7 +1377,7 @@ setbootflag(struct disklabel *lp)
{
struct partition *pp;
int i, errors = 0;
- daddr64_t bend;
+ daddr_t bend;
char part;
if (bootbuf == NULL)
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 1c6936bc645..0a461aa71c3 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.270 2013/04/19 14:10:20 otto Exp $ */
+/* $OpenBSD: editor.c,v 1.271 2013/06/11 16:42:04 deraadt Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -62,8 +62,8 @@ struct mountinfo {
/* used when allocating all space according to recommendations */
struct space_allocation {
- daddr64_t minsz; /* starts as blocks, xlated to sectors. */
- daddr64_t maxsz; /* starts as blocks, xlated to sectors. */
+ daddr_t minsz; /* starts as blocks, xlated to sectors. */
+ daddr_t maxsz; /* starts as blocks, xlated to sectors. */
int rate; /* % of extra space to use */
char *mp;
};
@@ -529,7 +529,7 @@ editor_allocspace(struct disklabel *lp_org)
struct space_allocation *ap;
struct partition *pp;
struct diskchunk *chunks;
- daddr64_t secs, chunkstart, chunksize, cylsecs, totsecs, xtrasecs;
+ daddr_t secs, chunkstart, chunksize, cylsecs, totsecs, xtrasecs;
char **partmp;
int i, j, lastalloc, index = 0, fragsize, partno;
int64_t physmem;
@@ -539,7 +539,7 @@ editor_allocspace(struct disklabel *lp_org)
overlap = 0;
for (i = 0; i < MAXPARTITIONS; i++) {
- daddr64_t psz, pstart, pend;
+ daddr_t psz, pstart, pend;
pp = &lp_org->d_partitions[i];
psz = DL_GETPSIZE(pp);
@@ -709,9 +709,9 @@ editor_resize(struct disklabel *lp, char *p)
{
struct disklabel label;
struct partition *pp, *prev;
- daddr64_t secs, sz, off;
+ daddr_t secs, sz, off;
#ifdef SUN_CYLCHECK
- daddr64_t cylsecs;
+ daddr_t cylsecs;
#endif
int partno, i;
@@ -2318,7 +2318,7 @@ max_partition_size(struct disklabel *lp, int partno)
}
void
-psize(daddr64_t sz, char unit, struct disklabel *lp)
+psize(daddr_t sz, char unit, struct disklabel *lp)
{
double d = scale(sz, unit, lp);
if (d < 0)
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h
index 3ca64744f8a..5826b841bb5 100644
--- a/sbin/dump/dump.h
+++ b/sbin/dump/dump.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump.h,v 1.16 2007/06/03 20:16:08 millert Exp $ */
+/* $OpenBSD: dump.h,v 1.17 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: dump.h,v 1.11 1997/06/05 11:13:20 lukem Exp $ */
/*-
@@ -105,8 +105,8 @@ int mapdirs(ino_t maxino, off_t *tapesize);
/* file dumping routines */
void ufs1_blksout(int32_t *blkp, int frags, ino_t ino);
-void ufs2_blksout(daddr64_t *blkp, int frags, ino_t ino);
-void bread(daddr64_t blkno, char *buf, int size);
+void ufs2_blksout(daddr_t *blkp, int frags, ino_t ino);
+void bread(daddr_t blkno, char *buf, int size);
void dumpino(union dinode *dp, ino_t ino);
void dumpmap(char *map, int type, ino_t ino);
void writeheader(ino_t ino);
@@ -114,7 +114,7 @@ void writeheader(ino_t ino);
/* tape writing routines */
int alloctape(void);
void close_rewind(void);
-void dumpblock(daddr64_t blkno, int size);
+void dumpblock(daddr_t blkno, int size);
void startnewtape(int top);
void trewind(void);
void writerec(char *dp, int isspcl);
diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c
index bf0ac0f3242..a2dccfc657f 100644
--- a/sbin/dump/tape.c
+++ b/sbin/dump/tape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tape.c,v 1.35 2013/04/25 06:43:20 otto Exp $ */
+/* $OpenBSD: tape.c,v 1.36 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: tape.c,v 1.11 1997/06/05 11:13:26 lukem Exp $ */
/*-
@@ -79,7 +79,7 @@ static void rollforward(void);
* The following structure defines the instruction packets sent to slaves.
*/
struct req {
- daddr64_t dblk;
+ daddr_t dblk;
int count;
};
int reqsiz;
@@ -152,7 +152,7 @@ void
writerec(char *dp, int isspcl)
{
- slp->req[trecno].dblk = (daddr64_t)0;
+ slp->req[trecno].dblk = (daddr_t)0;
slp->req[trecno].count = 1;
*(union u_spcl *)(*(nextblock)++) = *(union u_spcl *)dp;
if (isspcl)
@@ -164,10 +164,10 @@ writerec(char *dp, int isspcl)
}
void
-dumpblock(daddr64_t blkno, int size)
+dumpblock(daddr_t blkno, int size)
{
int avail, tpblks;
- daddr64_t dblkno;
+ daddr_t dblkno;
dblkno = fsbtodb(sblock, blkno);
tpblks = size >> tp_bshift;
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c
index eeadb6ccf9e..2d35b2cc59d 100644
--- a/sbin/dump/traverse.c
+++ b/sbin/dump/traverse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traverse.c,v 1.26 2013/04/23 21:39:59 deraadt Exp $ */
+/* $OpenBSD: traverse.c,v 1.27 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: traverse.c,v 1.17 1997/06/05 11:13:27 lukem Exp $ */
/*-
@@ -60,9 +60,9 @@ union dinode {
#define HASDUMPEDFILE 0x1
#define HASSUBDIRS 0x2
-static int dirindir(ino_t, daddr64_t, int, off_t *, off_t *, int);
-static void dmpindir(ino_t, daddr64_t, int, off_t *);
-static int searchdir(ino_t, daddr64_t, long, off_t, off_t *, int);
+static int dirindir(ino_t, daddr_t, int, off_t *, off_t *, int);
+static void dmpindir(ino_t, daddr_t, int, off_t *);
+static int searchdir(ino_t, daddr_t, long, off_t, off_t *, int);
/*
* This is an estimation of the number of TP_BSIZE blocks in the file.
@@ -377,7 +377,7 @@ mapdirs(ino_t maxino, off_t *tapesize)
* require the directory to be dumped.
*/
static int
-dirindir(ino_t ino, daddr64_t blkno, int ind_level, off_t *filesize,
+dirindir(ino_t ino, daddr_t blkno, int ind_level, off_t *filesize,
off_t *tapesize, int nodump)
{
int ret = 0;
@@ -420,7 +420,7 @@ dirindir(ino_t ino, daddr64_t blkno, int ind_level, off_t *filesize,
* contains any subdirectories.
*/
static int
-searchdir(ino_t ino, daddr64_t blkno, long size, off_t filesize,
+searchdir(ino_t ino, daddr_t blkno, long size, off_t filesize,
off_t *tapesize, int nodump)
{
struct direct *dp;
@@ -603,7 +603,7 @@ dumpino(union dinode *dp, ino_t ino)
* Read indirect blocks, and pass the data blocks to be dumped.
*/
static void
-dmpindir(ino_t ino, daddr64_t blk, int ind_level, off_t *size)
+dmpindir(ino_t ino, daddr_t blk, int ind_level, off_t *size)
{
int i, cnt;
char idblk[MAXBSIZE];
@@ -676,9 +676,9 @@ ufs1_blksout(int32_t *blkp, int frags, ino_t ino)
* Collect up the data into tape record sized buffers and output them.
*/
void
-ufs2_blksout(daddr64_t *blkp, int frags, ino_t ino)
+ufs2_blksout(daddr_t *blkp, int frags, ino_t ino)
{
- daddr64_t *bp;
+ daddr_t *bp;
int i, j, count, blks, tbperdb;
blks = howmany(frags * sblock->fs_fsize, TP_BSIZE);
@@ -797,7 +797,7 @@ int breaderrors = 0;
#define BREADEMAX 32
void
-bread(daddr64_t blkno, char *buf, int size)
+bread(daddr_t blkno, char *buf, int size)
{
int cnt, i;
diff --git a/sbin/fdisk/mbr.c b/sbin/fdisk/mbr.c
index 85e4bc483d1..264926b8125 100644
--- a/sbin/fdisk/mbr.c
+++ b/sbin/fdisk/mbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbr.c,v 1.29 2013/03/21 18:45:58 deraadt Exp $ */
+/* $OpenBSD: mbr.c,v 1.30 2013/06/11 16:42:04 deraadt Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -47,7 +47,7 @@
void
MBR_init(disk_t *disk, mbr_t *mbr)
{
- daddr64_t i;
+ daddr_t i;
int adj;
/* Fix up given mbr for this disk */
diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c
index a55b523d7da..835242ff7bf 100644
--- a/sbin/fsck_ffs/dir.c
+++ b/sbin/fsck_ffs/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.28 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: dir.c,v 1.29 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: dir.c,v 1.20 1996/09/27 22:45:11 christos Exp $ */
/*
@@ -59,7 +59,7 @@ struct odirtemplate odirhead = {
static int expanddir(union dinode *, char *);
static void freedir(ino_t, ino_t);
static struct direct *fsck_readdir(struct inodesc *);
-static struct bufarea *getdirblk(daddr64_t, long);
+static struct bufarea *getdirblk(daddr_t, long);
static int lftempname(char *, ino_t);
static int mkentry(struct inodesc *);
static int chgino(struct inodesc *);
@@ -495,7 +495,7 @@ makeentry(ino_t parent, ino_t ino, char *name)
static int
expanddir(union dinode *dp, char *name)
{
- daddr64_t lastbn, newblk;
+ daddr_t lastbn, newblk;
struct bufarea *bp;
char *cp, firstblk[DIRBLKSIZ];
u_int64_t dis;
@@ -657,7 +657,7 @@ lftempname(char *bufp, ino_t ino)
* Insure that it is held until another is requested.
*/
static struct bufarea *
-getdirblk(daddr64_t blkno, long size)
+getdirblk(daddr_t blkno, long size)
{
if (pdirbp != 0)
diff --git a/sbin/fsck_ffs/extern.h b/sbin/fsck_ffs/extern.h
index 8bcefe836c3..f03a7aeb77f 100644
--- a/sbin/fsck_ffs/extern.h
+++ b/sbin/fsck_ffs/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.11 2011/04/16 16:37:21 otto Exp $ */
+/* $OpenBSD: extern.h,v 1.12 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: extern.h,v 1.6 1996/09/27 22:45:12 christos Exp $ */
/*
@@ -28,14 +28,14 @@
void adjust(struct inodesc *, short);
int allocblk(long);
int allocdir(ino_t, ino_t, int);
-void blkerror(ino_t, char *, daddr64_t);
-int bread(int, char *, daddr64_t, long);
+void blkerror(ino_t, char *, daddr_t);
+int bread(int, char *, daddr_t, long);
void bufinit(void);
-void bwrite(int, char *, daddr64_t, long);
+void bwrite(int, char *, daddr_t, long);
void cacheino(union dinode *, ino_t);
int changeino(ino_t, char *, ino_t);
struct fstab;
-int chkrange(daddr64_t, int);
+int chkrange(daddr_t, int);
void ckfini(int);
int ckinode(union dinode *, struct inodesc *);
void clri(struct inodesc *, char *, int);
@@ -47,7 +47,7 @@ void fileerror(ino_t, ino_t, char *);
int findino(struct inodesc *);
int findname(struct inodesc *);
void flush(int, struct bufarea *);
-void freeblk(daddr64_t, long);
+void freeblk(daddr_t, long);
void freeino(ino_t);
void freeinodebuf(void);
int ftypeok(union dinode *);
diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h
index 4a9c5bacb25..848f114184a 100644
--- a/sbin/fsck_ffs/fsck.h
+++ b/sbin/fsck_ffs/fsck.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsck.h,v 1.26 2011/05/08 14:38:40 otto Exp $ */
+/* $OpenBSD: fsck.h,v 1.27 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: fsck.h,v 1.13 1996/10/11 20:15:46 thorpej Exp $ */
/*
@@ -105,7 +105,7 @@ struct inostatlist {
* buffer cache structure.
*/
struct bufarea {
- daddr64_t b_bno;
+ daddr_t b_bno;
struct bufarea *b_next; /* free list queue */
struct bufarea *b_prev; /* free list queue */
int b_size;
@@ -143,12 +143,12 @@ struct bufarea asblk; /* alternate file system superblock */
struct bufarea cgblk; /* cylinder group blocks */
struct bufarea *pdirbp; /* current directory contents */
struct bufarea *pbp; /* current inode block */
-struct bufarea *getdatablk(daddr64_t, long);
+struct bufarea *getdatablk(daddr_t, long);
#define dirty(bp) (bp)->b_dirty = 1
#define initbarea(bp) \
(bp)->b_dirty = 0; \
- (bp)->b_bno = (daddr64_t)-1; \
+ (bp)->b_bno = (daddr_t)-1; \
(bp)->b_flags = 0;
#define sbdirty() sblk.b_dirty = 1
@@ -159,7 +159,7 @@ struct bufarea *getdatablk(daddr64_t, long);
enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE};
struct inodesc {
- daddr64_t id_blkno; /* current block number being examined */
+ daddr_t id_blkno; /* current block number being examined */
quad_t id_filesize; /* for DATA nodes, the size of the directory */
int (*id_func) /* function to be applied to blocks of inode */
(struct inodesc *);
@@ -200,7 +200,7 @@ struct inodesc {
*/
struct dups {
struct dups *next;
- daddr64_t dup;
+ daddr_t dup;
};
struct dups *duplist; /* head of dup list */
struct dups *muldup; /* end of unique duplicate dup block numbers */
@@ -225,7 +225,7 @@ struct inoinfo {
ino_t i_parent; /* inode number of parent */
ino_t i_dotdot; /* inode number of `..' */
u_int i_numblks; /* size of block array in bytes */
- daddr64_t i_blks[1]; /* actually longer */
+ daddr_t i_blks[1]; /* actually longer */
} **inphead, **inpsort;
extern long numdirs, listmax, inplast;
@@ -247,7 +247,7 @@ int fsreadfd; /* file descriptor for reading file system */
int fswritefd; /* file descriptor for writing file system */
int rerun; /* rerun fsck. Only used in non-preen mode */
-daddr64_t maxfsblock; /* number of blocks in the file system */
+daddr_t maxfsblock; /* number of blocks in the file system */
char *blockmap; /* ptr to primary blk allocation map */
ino_t maxino; /* number of inodes in file system */
ino_t lastino; /* last inode in use */
@@ -256,8 +256,8 @@ ino_t lfdir; /* lost & found directory inode number */
char *lfname; /* lost & found directory name */
int lfmode; /* lost & found directory creation mode */
-daddr64_t n_blks; /* number of blocks in use */
-daddr64_t n_files; /* number of files in use */
+daddr_t n_blks; /* number of blocks in use */
+daddr_t n_files; /* number of files in use */
#define clearinode(dp) \
if (sblock.fs_magic == FS_UFS1_MAGIC) { \
@@ -281,7 +281,7 @@ struct ufs2_dinode ufs2_zino;
union dinode *ginode(ino_t);
struct inoinfo *getinoinfo(ino_t);
-void getblk(struct bufarea *, daddr64_t, long);
+void getblk(struct bufarea *, daddr_t, long);
ino_t allocino(ino_t, int);
int (*info_fn)(char *, size_t);
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index d611f9c1ee4..87b262aa362 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inode.c,v 1.37 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: inode.c,v 1.38 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: inode.c,v 1.23 1996/10/11 20:15:47 thorpej Exp $ */
/*
@@ -229,7 +229,7 @@ iblock(struct inodesc *idesc, long ilevel, off_t isize)
* Return 0 if in range, 1 if out of range.
*/
int
-chkrange(daddr64_t blk, int cnt)
+chkrange(daddr_t blk, int cnt)
{
int c;
@@ -274,7 +274,7 @@ chkrange(daddr64_t blk, int cnt)
union dinode *
ginode(ino_t inumber)
{
- daddr64_t iblk;
+ daddr_t iblk;
if (inumber < ROOTINO || inumber > maxino)
errexit("bad inode number %llu to ginode\n",
@@ -305,7 +305,7 @@ union dinode *
getnextinode(ino_t inumber)
{
long size;
- daddr64_t dblk;
+ daddr_t dblk;
union dinode *dp;
static caddr_t nextinop;
@@ -394,7 +394,7 @@ cacheino(union dinode *dp, ino_t inumber)
blks = howmany(DIP(dp, di_size), sblock.fs_bsize);
if (blks > NDADDR)
blks = NDADDR + NIADDR;
- inp = malloc(sizeof(*inp) + (blks ? blks - 1 : 0) * sizeof(daddr64_t));
+ inp = malloc(sizeof(*inp) + (blks ? blks - 1 : 0) * sizeof(daddr_t));
if (inp == NULL)
errexit("cannot allocate memory for inode cache\n");
inpp = &inphead[inumber % numdirs];
@@ -543,7 +543,7 @@ pinode(ino_t ino)
}
void
-blkerror(ino_t ino, char *type, daddr64_t blk)
+blkerror(ino_t ino, char *type, daddr_t blk)
{
pfatal("%lld %s I=%llu", blk, type, (unsigned long long)ino);
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c
index 6edc77835e8..6621984b90f 100644
--- a/sbin/fsck_ffs/main.c
+++ b/sbin/fsck_ffs/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.39 2013/04/25 06:43:20 otto Exp $ */
+/* $OpenBSD: main.c,v 1.40 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: main.c,v 1.22 1996/10/11 20:15:48 thorpej Exp $ */
/*
@@ -150,7 +150,7 @@ argtoi(int flag, char *req, char *str, int base)
int
checkfilesys(char *filesys, char *mntpt, long auxdata, int child)
{
- daddr64_t n_ffree, n_bfree;
+ daddr_t n_ffree, n_bfree;
struct dups *dp;
struct zlncnt *zlnp;
int cylno;
diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c
index 574f5ad504f..5fff60cc922 100644
--- a/sbin/fsck_ffs/pass1.c
+++ b/sbin/fsck_ffs/pass1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass1.c,v 1.37 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: pass1.c,v 1.38 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $ */
/*
@@ -45,8 +45,8 @@
#include "extern.h"
#include "fsutil.h"
-static daddr64_t badblk;
-static daddr64_t dupblk;
+static daddr_t badblk;
+static daddr_t dupblk;
static void checkinode(ino_t, struct inodesc *);
static ino_t info_inumber;
@@ -67,7 +67,7 @@ pass1(void)
struct inostat *info;
int c;
struct inodesc idesc;
- daddr64_t i, cgd;
+ daddr_t i, cgd;
u_int8_t *cp;
/*
@@ -216,9 +216,9 @@ checkinode(ino_t inumber, struct inodesc *idesc)
dp->dp1.di_mode || dp->dp1.di_size)) ||
(sblock.fs_magic == FS_UFS2_MAGIC &&
(memcmp(dp->dp2.di_db, ufs2_zino.di_db,
- NDADDR * sizeof(daddr64_t)) ||
+ NDADDR * sizeof(daddr_t)) ||
memcmp(dp->dp2.di_ib, ufs2_zino.di_ib,
- NIADDR * sizeof(daddr64_t)) ||
+ NIADDR * sizeof(daddr_t)) ||
dp->dp2.di_mode || dp->dp2.di_size))) {
pfatal("PARTIALLY ALLOCATED INODE I=%llu",
(unsigned long long)inumber);
@@ -355,7 +355,7 @@ pass1check(struct inodesc *idesc)
{
int res = KEEPON;
int anyout, nfrags;
- daddr64_t blkno = idesc->id_blkno;
+ daddr_t blkno = idesc->id_blkno;
struct dups *dlp;
struct dups *new;
diff --git a/sbin/fsck_ffs/pass1b.c b/sbin/fsck_ffs/pass1b.c
index 3714bf77a73..6d33c402ea3 100644
--- a/sbin/fsck_ffs/pass1b.c
+++ b/sbin/fsck_ffs/pass1b.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass1b.c,v 1.18 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: pass1b.c,v 1.19 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: pass1b.c,v 1.10 1996/09/23 16:18:37 christos Exp $ */
/*
@@ -89,7 +89,7 @@ pass1bcheck(struct inodesc *idesc)
{
struct dups *dlp;
int nfrags, res = KEEPON;
- daddr64_t blkno = idesc->id_blkno;
+ daddr_t blkno = idesc->id_blkno;
for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
if (chkrange(blkno, 1))
diff --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c
index 5633360651b..8cfe1078be8 100644
--- a/sbin/fsck_ffs/pass2.c
+++ b/sbin/fsck_ffs/pass2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass2.c,v 1.33 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: pass2.c,v 1.34 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: pass2.c,v 1.17 1996/09/27 22:45:15 christos Exp $ */
/*
@@ -469,7 +469,7 @@ again:
static int
blksort(const void *inpp1, const void *inpp2)
{
- daddr64_t d;
+ daddr_t d;
d = (* (struct inoinfo **) inpp1)->i_blks[0] -
(* (struct inoinfo **) inpp2)->i_blks[0];
diff --git a/sbin/fsck_ffs/pass4.c b/sbin/fsck_ffs/pass4.c
index b0ea33c4ddd..4dcc44dad50 100644
--- a/sbin/fsck_ffs/pass4.c
+++ b/sbin/fsck_ffs/pass4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass4.c,v 1.21 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: pass4.c,v 1.22 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: pass4.c,v 1.11 1996/09/27 22:45:17 christos Exp $ */
/*
@@ -124,7 +124,7 @@ pass4check(struct inodesc *idesc)
{
struct dups *dlp;
int nfrags, res = KEEPON;
- daddr64_t blkno = idesc->id_blkno;
+ daddr_t blkno = idesc->id_blkno;
for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
if (chkrange(blkno, 1)) {
diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c
index e15010be372..0485c79aa57 100644
--- a/sbin/fsck_ffs/pass5.c
+++ b/sbin/fsck_ffs/pass5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass5.c,v 1.42 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: pass5.c,v 1.43 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $ */
/*
@@ -63,8 +63,8 @@ pass5(void)
int inomapsize, blkmapsize;
struct fs *fs = &sblock;
struct cg *cg = &cgrp;
- daddr64_t dbase, dmax;
- daddr64_t d;
+ daddr_t dbase, dmax;
+ daddr_t d;
long i, j, k, rewritecg = 0;
struct csum *cs;
struct csum_total cstotal;
diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c
index a275e3919b6..5e097964d74 100644
--- a/sbin/fsck_ffs/setup.c
+++ b/sbin/fsck_ffs/setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setup.c,v 1.48 2011/04/24 07:07:03 otto Exp $ */
+/* $OpenBSD: setup.c,v 1.49 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: setup.c,v 1.27 1996/09/27 22:45:19 christos Exp $ */
/*
@@ -429,7 +429,7 @@ badsblabel:
static int
readsb(int listerr)
{
- daddr64_t super = 0;
+ daddr_t super = 0;
int i;
if (bflag) {
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c
index 8b51bb280f9..ca5d4a857cb 100644
--- a/sbin/fsck_ffs/utilities.c
+++ b/sbin/fsck_ffs/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.40 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: utilities.c,v 1.41 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */
/*
@@ -53,7 +53,7 @@
long diskreads, totalreads; /* Disk cache statistics */
-static void rwerror(char *, daddr64_t);
+static void rwerror(char *, daddr_t);
int
ftypeok(union dinode *dp)
@@ -179,7 +179,7 @@ bufinit(void)
* Manage a cache of directory blocks.
*/
struct bufarea *
-getdatablk(daddr64_t blkno, long size)
+getdatablk(daddr_t blkno, long size)
{
struct bufarea *bp;
@@ -206,9 +206,9 @@ foundit:
}
void
-getblk(struct bufarea *bp, daddr64_t blk, long size)
+getblk(struct bufarea *bp, daddr_t blk, long size)
{
- daddr64_t dblk;
+ daddr_t dblk;
dblk = fsbtodb(&sblock, blk);
if (bp->b_bno != dblk) {
@@ -245,7 +245,7 @@ flush(int fd, struct bufarea *bp)
}
static void
-rwerror(char *mesg, daddr64_t blk)
+rwerror(char *mesg, daddr_t blk)
{
if (preen == 0)
@@ -331,7 +331,7 @@ ckfini(int markclean)
}
int
-bread(int fd, char *buf, daddr64_t blk, long size)
+bread(int fd, char *buf, daddr_t blk, long size)
{
char *cp;
int i, errs;
@@ -366,7 +366,7 @@ bread(int fd, char *buf, daddr64_t blk, long size)
}
void
-bwrite(int fd, char *buf, daddr64_t blk, long size)
+bwrite(int fd, char *buf, daddr_t blk, long size)
{
int i;
char *cp;
@@ -442,7 +442,7 @@ allocblk(long frags)
* Free a previously allocated block
*/
void
-freeblk(daddr64_t blkno, long frags)
+freeblk(daddr_t blkno, long frags)
{
struct inodesc idesc;
diff --git a/sbin/fsdb/fsdb.h b/sbin/fsdb/fsdb.h
index c5850ac0d96..04fc6402b13 100644
--- a/sbin/fsdb/fsdb.h
+++ b/sbin/fsdb/fsdb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsdb.h,v 1.8 2008/06/26 05:42:06 ray Exp $ */
+/* $OpenBSD: fsdb.h,v 1.9 2013/06/11 16:42:04 deraadt Exp $ */
/* $NetBSD: fsdb.h,v 1.4 1996/09/28 19:30:36 christos Exp $ */
/*-
@@ -30,9 +30,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-extern int bread(int fd, char *buf, daddr64_t blk, long size);
-extern void bwrite(int fd, char *buf, daddr64_t blk, long size);
-extern void rwerror(char *mesg, daddr64_t blk);
+extern int bread(int fd, char *buf, daddr_t blk, long size);
+extern void bwrite(int fd, char *buf, daddr_t blk, long size);
+extern void rwerror(char *mesg, daddr_t blk);
extern int reply(char *question);
extern long dev_bsize;
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index 262a6ec5960..3738071f941 100644
--- a/sbin/fsirand/fsirand.c
+++ b/sbin/fsirand/fsirand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsirand.c,v 1.28 2013/04/23 17:29:14 deraadt Exp $ */
+/* $OpenBSD: fsirand.c,v 1.29 2013/06/11 16:42:04 deraadt Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -101,7 +101,7 @@ fsirand(char *device)
size_t ibufsize;
struct fs *sblock, *tmpsblock;
ino_t inumber;
- daddr64_t sblockloc, dblk;
+ daddr_t sblockloc, dblk;
char sbuf[SBSIZE], sbuftmp[SBSIZE];
int devfd, n, cg, i;
char *devpath;
diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c
index b189498b65e..84dba2d7fae 100644
--- a/sbin/growfs/debug.c
+++ b/sbin/growfs/debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: debug.c,v 1.8 2009/10/27 23:59:33 deraadt Exp $ */
+/* $OpenBSD: debug.c,v 1.9 2013/06/11 16:42:04 deraadt Exp $ */
/*
* Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
* Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
@@ -799,24 +799,24 @@ dbg_dump_ufs2_ino(struct fs *sb, const char *comment, struct ufs2_dinode *ino)
remaining_blocks = howmany(ino->di_size, sb->fs_bsize); /* XXX ts - +1? */
for (ictr = 0; ictr < MIN(NDADDR, remaining_blocks); ictr++) {
- fprintf(dbg_log, "db daddr64_t[%x] 0x%16jx\n", ictr,
+ fprintf(dbg_log, "db daddr_t[%x] 0x%16jx\n", ictr,
ino->di_db[ictr]);
}
remaining_blocks -= NDADDR;
if (remaining_blocks > 0) {
- fprintf(dbg_log, "ib daddr64_t[0] 0x%16jx\n",
+ fprintf(dbg_log, "ib daddr_t[0] 0x%16jx\n",
ino->di_ib[0]);
}
- remaining_blocks -= howmany(sb->fs_bsize, sizeof(daddr64_t));
+ remaining_blocks -= howmany(sb->fs_bsize, sizeof(daddr_t));
if (remaining_blocks > 0) {
- fprintf(dbg_log, "ib daddr64_t[1] 0x%16jx\n",
+ fprintf(dbg_log, "ib daddr_t[1] 0x%16jx\n",
ino->di_ib[1]);
}
#define SQUARE(a) ((a)*(a))
- remaining_blocks -= SQUARE(howmany(sb->fs_bsize, sizeof(daddr64_t)));
+ remaining_blocks -= SQUARE(howmany(sb->fs_bsize, sizeof(daddr_t)));
#undef SQUARE
if (remaining_blocks > 0) {
- fprintf(dbg_log, "ib daddr64_t[2] 0x%16jx\n",
+ fprintf(dbg_log, "ib daddr_t[2] 0x%16jx\n",
ino->di_ib[2]);
}
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 9ff06da85fd..cacf37efb35 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: growfs.c,v 1.30 2013/04/23 21:27:15 deraadt Exp $ */
+/* $OpenBSD: growfs.c,v 1.31 2013/06/11 16:42:04 deraadt Exp $ */
/*
* Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
* Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
@@ -87,7 +87,7 @@ static union {
* Possible superblock locations ordered from most to least likely.
*/
static int sblock_try[] = SBLOCKSEARCH;
-static daddr64_t sblockloc;
+static daddr_t sblockloc;
static union {
struct cg cg;
@@ -113,7 +113,7 @@ union dinode {
else \
(dp)->dp2.field = (val); \
} while (0)
-static daddr64_t inoblk; /* inode block address */
+static daddr_t inoblk; /* inode block address */
static char inobuf[MAXBSIZE]; /* inode block */
ino_t maxino; /* last valid inode */
@@ -123,19 +123,19 @@ ino_t maxino; /* last valid inode */
* summary for all cylinder groups located in the first cylinder group.
*/
struct gfs_bpp {
- daddr64_t old; /* old block number */
- daddr64_t new; /* new block number */
+ daddr_t old; /* old block number */
+ daddr_t new; /* new block number */
#define GFS_FL_FIRST 1
#define GFS_FL_LAST 2
- unsigned int flags; /* special handling required */
- int found; /* how many references were updated */
+ unsigned int flags; /* special handling required */
+ int found; /* how many references were updated */
};
/* ******************************************************** PROTOTYPES ***** */
static void growfs(int, int, unsigned int);
-static void rdfs(daddr64_t, size_t, void *, int);
-static void wtfs(daddr64_t, size_t, void *, int, unsigned int);
-static daddr64_t alloc(void);
+static void rdfs(daddr_t, size_t, void *, int);
+static void wtfs(daddr_t, size_t, void *, int, unsigned int);
+static daddr_t alloc(void);
static int charsperline(void);
static void usage(void);
static int isblock(struct fs *, unsigned char *, int);
@@ -147,14 +147,14 @@ static void updcsloc(time_t, int, int, unsigned int);
static struct disklabel *get_disklabel(int);
static void return_disklabel(int, struct disklabel *, unsigned int);
static union dinode *ginode(ino_t, int, int);
-static void frag_adjust(daddr64_t, int);
-static int cond_bl_upd(daddr64_t *, struct gfs_bpp *, int, int,
+static void frag_adjust(daddr_t, int);
+static int cond_bl_upd(daddr_t *, struct gfs_bpp *, int, int,
unsigned int);
static void updclst(int);
static void updrefs(int, ino_t, struct gfs_bpp *, int, int, unsigned int);
-static void indirchk(daddr64_t, daddr64_t, daddr64_t, daddr64_t,
+static void indirchk(daddr_t, daddr_t, daddr_t, daddr_t,
struct gfs_bpp *, int, int, unsigned int);
-static void ffs1_sb_update(struct fs *, daddr64_t);
+static void ffs1_sb_update(struct fs *, daddr_t);
/* ************************************************************ growfs ***** */
/*
@@ -375,8 +375,8 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag)
{
DBG_FUNC("initcg")
static char *iobuf;
- daddr64_t d, dlower, dupper, blkno, start;
- daddr64_t i, cbase, dmax;
+ daddr_t d, dlower, dupper, blkno, start;
+ daddr_t i, cbase, dmax;
struct ufs1_dinode *dp1;
struct ufs2_dinode *dp2;
struct csum *cs;
@@ -580,7 +580,7 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag)
* statistic, which seems to be otherwise a rather complex operation.
*/
static void
-frag_adjust(daddr64_t frag, int sign)
+frag_adjust(daddr_t frag, int sign)
{
DBG_FUNC("frag_adjust")
int fragsize;
@@ -635,12 +635,12 @@ frag_adjust(daddr64_t frag, int sign)
* out if a write back operation is needed.
*/
static int
-cond_bl_upd(daddr64_t *block, struct gfs_bpp *field, int fsi, int fso,
+cond_bl_upd(daddr_t *block, struct gfs_bpp *field, int fsi, int fso,
unsigned int Nflag)
{
DBG_FUNC("cond_bl_upd")
struct gfs_bpp *f;
- daddr64_t src, dst;
+ daddr_t src, dst;
int fragnum;
void *ibuf;
@@ -700,7 +700,7 @@ static void
updjcg(int cylno, time_t utime, int fsi, int fso, unsigned int Nflag)
{
DBG_FUNC("updjcg")
- daddr64_t cbase, dmax, dupper;
+ daddr_t cbase, dmax, dupper;
struct csum *cs;
int i, k;
int j = 0;
@@ -940,7 +940,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
struct csum *cs;
int ocscg, ncscg;
int blocks;
- daddr64_t cbase, dupper, odupper, d, f, g;
+ daddr_t cbase, dupper, odupper, d, f, g;
int ind;
int cylno, inc;
struct gfs_bpp *bp;
@@ -1514,7 +1514,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
* Here we read some block(s) from disk.
*/
static void
-rdfs(daddr64_t bno, size_t size, void *bf, int fsi)
+rdfs(daddr_t bno, size_t size, void *bf, int fsi)
{
DBG_FUNC("rdfs")
ssize_t n;
@@ -1539,7 +1539,7 @@ rdfs(daddr64_t bno, size_t size, void *bf, int fsi)
* Here we write some block(s) to disk.
*/
static void
-wtfs(daddr64_t bno, size_t size, void *bf, int fso, unsigned int Nflag)
+wtfs(daddr_t bno, size_t size, void *bf, int fso, unsigned int Nflag)
{
DBG_FUNC("wtfs")
ssize_t n;
@@ -1567,11 +1567,11 @@ wtfs(daddr64_t bno, size_t size, void *bf, int fso, unsigned int Nflag)
* that acg contains the current cylinder group. As we may take a block from
* somewhere in the filesystem we have to handle cluster summary here.
*/
-static daddr64_t
+static daddr_t
alloc(void)
{
DBG_FUNC("alloc")
- daddr64_t d, blkno;
+ daddr_t d, blkno;
int lcs1, lcs2;
int l;
int csmin, csmax;
@@ -2075,7 +2075,7 @@ main(int argc, char **argv)
* later on realize we have to abort our operation, on that block
* there should be no data, so we can't destroy something yet.
*/
- wtfs((daddr64_t)pp->p_size-1, (size_t)DEV_BSIZE, (void *)&sblock,
+ wtfs((daddr_t)pp->p_size-1, (size_t)DEV_BSIZE, (void *)&sblock,
fso, Nflag);
/*
@@ -2285,8 +2285,8 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
Nflag)
{
DBG_FUNC("updrefs")
- daddr64_t len, lbn, numblks;
- daddr64_t iptr, blksperindir;
+ daddr_t len, lbn, numblks;
+ daddr_t iptr, blksperindir;
union dinode *ino;
int i, mode, inodeupdated;
@@ -2362,13 +2362,13 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
* Recursively check all the indirect blocks.
*/
static void
-indirchk(daddr64_t blksperindir, daddr64_t lbn, daddr64_t blkno,
- daddr64_t lastlbn, struct gfs_bpp *bp, int fsi, int fso, unsigned int Nflag)
+indirchk(daddr_t blksperindir, daddr_t lbn, daddr_t blkno,
+ daddr_t lastlbn, struct gfs_bpp *bp, int fsi, int fso, unsigned int Nflag)
{
DBG_FUNC("indirchk")
void *ibuf;
int i, last;
- daddr64_t iptr;
+ daddr_t iptr;
DBG_ENTER;
@@ -2383,14 +2383,14 @@ indirchk(daddr64_t blksperindir, daddr64_t lbn, daddr64_t blkno,
if (sblock.fs_magic == FS_UFS1_MAGIC)
iptr = ((int32_t *)ibuf)[i];
else
- iptr = ((daddr64_t *)ibuf)[i];
+ iptr = ((daddr_t *)ibuf)[i];
if (iptr == 0)
continue;
if (cond_bl_upd(&iptr, bp, fsi, fso, Nflag)) {
if (sblock.fs_magic == FS_UFS1_MAGIC)
((int32_t *)ibuf)[i] = iptr;
else
- ((daddr64_t *)ibuf)[i] = iptr;
+ ((daddr_t *)ibuf)[i] = iptr;
}
if (blksperindir == 1)
continue;
@@ -2403,7 +2403,7 @@ indirchk(daddr64_t blksperindir, daddr64_t lbn, daddr64_t blkno,
}
static void
-ffs1_sb_update(struct fs *fs, daddr64_t sbloc)
+ffs1_sb_update(struct fs *fs, daddr_t sbloc)
{
fs->fs_flags = fs->fs_ffs1_flags;
fs->fs_sblockloc = sbloc;
diff --git a/sbin/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c
index 7029d405212..c0b7e08aafb 100644
--- a/sbin/ncheck_ffs/ncheck_ffs.c
+++ b/sbin/ncheck_ffs/ncheck_ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncheck_ffs.c,v 1.36 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: ncheck_ffs.c,v 1.37 2013/06/11 16:42:05 deraadt Exp $ */
/*-
* Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
@@ -104,11 +104,11 @@ int nicache;
void addinode(ino_t inum);
void *getino(ino_t inum);
void findinodes(ino_t);
-void bread(daddr64_t, char *, int);
+void bread(daddr_t, char *, int);
__dead void usage(void);
void scanonedir(ino_t, const char *);
-void dirindir(ino_t, daddr64_t, int, off_t, const char *);
-void searchdir(ino_t, daddr64_t, long, off_t, const char *);
+void dirindir(ino_t, daddr_t, int, off_t, const char *);
+void searchdir(ino_t, daddr_t, long, off_t, const char *);
int matchino(const void *, const void *);
int matchcache(const void *, const void *);
void cacheino(ino_t, void *);
@@ -228,7 +228,7 @@ void *
getino(ino_t inum)
{
static char *itab = NULL;
- static daddr64_t iblk = -1;
+ static daddr_t iblk = -1;
void *dp;
size_t dsize;
@@ -261,7 +261,7 @@ int breaderrors = 0;
#define BREADEMAX 32
void
-bread(daddr64_t blkno, char *buf, int size)
+bread(daddr_t blkno, char *buf, int size)
{
int cnt, i;
@@ -364,7 +364,7 @@ scanonedir(ino_t ino, const char *path)
* require the directory to be dumped.
*/
void
-dirindir(ino_t ino, daddr64_t blkno, int ind_level, off_t filesize,
+dirindir(ino_t ino, daddr_t blkno, int ind_level, off_t filesize,
const char *path)
{
int i;
@@ -402,7 +402,7 @@ dirindir(ino_t ino, daddr64_t blkno, int ind_level, off_t filesize,
* contains any subdirectories.
*/
void
-searchdir(ino_t ino, daddr64_t blkno, long size, off_t filesize,
+searchdir(ino_t ino, daddr_t blkno, long size, off_t filesize,
const char *path)
{
char *dblk;
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 8f911c3cc5b..8719a5ec802 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkfs.c,v 1.77 2013/04/23 21:27:38 deraadt Exp $ */
+/* $OpenBSD: mkfs.c,v 1.78 2013/06/11 16:42:05 deraadt Exp $ */
/* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */
/*
@@ -86,7 +86,7 @@
extern int mfs; /* run as the memory based filesystem */
extern int Nflag; /* run mkfs without writing file system */
extern int Oflag; /* format as an 4.3BSD file system */
-extern daddr64_t fssize; /* file system size */
+extern daddr_t fssize; /* file system size */
extern long long sectorsize; /* bytes/sector */
extern int fsize; /* fragment size */
extern int bsize; /* block size */
@@ -124,11 +124,11 @@ int fsi, fso;
static caddr_t iobuf;
static long iobufsize;
-daddr64_t alloc(int, int);
+daddr_t alloc(int, int);
static int charsperline(void);
static int ilog2(int);
void initcg(int, time_t);
-void wtfs(daddr64_t, int, void *);
+void wtfs(daddr_t, int, void *);
int fsinit1(time_t, mode_t, uid_t, gid_t);
int fsinit2(time_t);
int makedir(struct direct *, int);
@@ -136,7 +136,7 @@ void iput(union dinode *, ino_t);
void setblock(struct fs *, unsigned char *, int);
void clrblock(struct fs *, unsigned char *, int);
int isblock(struct fs *, unsigned char *, int);
-void rdfs(daddr64_t, int, void *);
+void rdfs(daddr_t, int, void *);
void mkfs(struct partition *, char *, int, int,
mode_t, uid_t, gid_t);
static void checksz(void);
@@ -612,7 +612,7 @@ void
initcg(int cylno, time_t utime)
{
int i, j, d, dlower, dupper, blkno, start;
- daddr64_t cbase, dmax;
+ daddr_t cbase, dmax;
struct ufs1_dinode *dp1;
struct ufs2_dinode *dp2;
struct csum *cs;
@@ -907,11 +907,11 @@ makedir(struct direct *protodir, int entries)
/*
* allocate a block or frag
*/
-daddr64_t
+daddr_t
alloc(int size, int mode)
{
int i, frag;
- daddr64_t d, blkno;
+ daddr_t d, blkno;
rdfs(fsbtodb(&sblock, cgtod(&sblock, 0)), sblock.fs_cgsize,
(char *)&acg);
@@ -964,7 +964,7 @@ goth:
void
iput(union dinode *ip, ino_t ino)
{
- daddr64_t d;
+ daddr_t d;
if (Oflag <= 1)
ip->dp1.di_gen = (u_int32_t)arc4random();
@@ -1004,7 +1004,7 @@ iput(union dinode *ip, ino_t ino)
* read a block from the file system
*/
void
-rdfs(daddr64_t bno, int size, void *bf)
+rdfs(daddr_t bno, int size, void *bf)
{
int n;
@@ -1022,7 +1022,7 @@ rdfs(daddr64_t bno, int size, void *bf)
* write a block to the file system
*/
void
-wtfs(daddr64_t bno, int size, void *bf)
+wtfs(daddr_t bno, int size, void *bf)
{
int n;
@@ -1168,7 +1168,7 @@ struct inoinfo {
ino_t i_dotdot; /* inode number of `..' */
u_int i_numblks; /* size of block array in bytes */
- daddr64_t i_blks[1]; /* actually longer */
+ daddr_t i_blks[1]; /* actually longer */
};
static void
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 82b98261119..d214a381870 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.90 2011/05/23 10:56:17 dcoppa Exp $ */
+/* $OpenBSD: newfs.c,v 1.91 2013/06/11 16:42:05 deraadt Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -113,7 +113,7 @@ u_short dkcksum(struct disklabel *);
int mfs; /* run as the memory based filesystem */
int Nflag; /* run without writing file system */
int Oflag = 1; /* 0 = 4.3BSD ffs, 1 = 4.4BSD ffs, 2 = ffs2 */
-daddr64_t fssize; /* file system size */
+daddr_t fssize; /* file system size */
long long sectorsize; /* bytes/sector */
int fsize = 0; /* fragment size */
int bsize = 0; /* block size */
@@ -428,13 +428,13 @@ havelabel:
}
if (fssize_usebytes) {
- fssize = (daddr64_t)fssize_input / (daddr64_t)sectorsize;
- if ((daddr64_t)fssize_input % (daddr64_t)sectorsize != 0)
+ fssize = (daddr_t)fssize_input / (daddr_t)sectorsize;
+ if ((daddr_t)fssize_input % (daddr_t)sectorsize != 0)
fssize++;
} else if (fssize_input == 0)
fssize = DL_GETPSIZE(pp);
else
- fssize = (daddr64_t)fssize_input;
+ fssize = (daddr_t)fssize_input;
if (fssize > DL_GETPSIZE(pp) && !mfs)
fatal("%s: maximum file system size on the `%c' partition is "
@@ -598,7 +598,7 @@ rewritelabel(char *s, int fd, struct disklabel *lp)
if (lp->d_type == DTYPE_SMD && lp->d_flags & D_BADSECT) {
int i;
int cfd;
- daddr64_t alt;
+ daddr_t alt;
char specname[64];
char blk[1024];
char *cp;
diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c
index 9f806fcbe1e..8446214a343 100644
--- a/sbin/quotacheck/quotacheck.c
+++ b/sbin/quotacheck/quotacheck.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: quotacheck.c,v 1.30 2013/04/23 21:28:10 deraadt Exp $ */
+/* $OpenBSD: quotacheck.c,v 1.31 2013/06/11 16:42:05 deraadt Exp $ */
/* $NetBSD: quotacheck.c,v 1.12 1996/03/30 22:34:25 mark Exp $ */
/*
@@ -111,7 +111,7 @@ u_int32_t highid[MAXQUOTAS]; /* highest addid()'ed identifier per type */
struct fileusage *
addid(u_int32_t, int, char *);
char *blockcheck(char *);
-void bread(daddr64_t, char *, long);
+void bread(daddr_t, char *, long);
int chkquota(const char *, const char *, const char *, void *, pid_t *);
void freeinodebuf(void);
union dinode *
@@ -654,7 +654,7 @@ union dinode *
getnextinode(ino_t inumber)
{
long size;
- daddr64_t dblk;
+ daddr_t dblk;
union dinode *dp;
static caddr_t nextinop;
@@ -735,7 +735,7 @@ freeinodebuf(void)
* Read specified disk blocks.
*/
void
-bread(daddr64_t bno, char *buf, long cnt)
+bread(daddr_t bno, char *buf, long cnt)
{
if (lseek(fi, (off_t)bno * dev_bsize, SEEK_SET) < 0 ||
diff --git a/sbin/scan_ffs/scan_ffs.c b/sbin/scan_ffs/scan_ffs.c
index 11f9a7505af..f490ed0c3e2 100644
--- a/sbin/scan_ffs/scan_ffs.c
+++ b/sbin/scan_ffs/scan_ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scan_ffs.c,v 1.15 2013/04/02 05:22:04 deraadt Exp $ */
+/* $OpenBSD: scan_ffs.c,v 1.16 2013/06/11 16:42:05 deraadt Exp $ */
/*
* Copyright (c) 1998 Niklas Hallqvist, Tobias Weingartner
@@ -47,12 +47,12 @@
static void usage(void);
static int
-ufsscan(int fd, daddr64_t beg, daddr64_t end, int flags)
+ufsscan(int fd, daddr_t beg, daddr_t end, int flags)
{
static char lastmount[MAXMNTLEN];
static u_int8_t buf[SBSIZE * SBCOUNT];
struct fs *sb;
- daddr64_t blk, lastblk;
+ daddr_t blk, lastblk;
int n;
lastblk = -1;
@@ -132,7 +132,7 @@ int
main(int argc, char *argv[])
{
int ch, fd, flags = 0;
- daddr64_t beg = 0, end = -1;
+ daddr_t beg = 0, end = -1;
const char *errstr;
while ((ch = getopt(argc, argv, "lsvb:e:")) != -1)
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c
index 75c4cd79203..7185659cfff 100644
--- a/sbin/tunefs/tunefs.c
+++ b/sbin/tunefs/tunefs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tunefs.c,v 1.31 2011/05/05 16:29:33 millert Exp $ */
+/* $OpenBSD: tunefs.c,v 1.32 2013/06/11 16:42:05 deraadt Exp $ */
/* $NetBSD: tunefs.c,v 1.33 2005/01/19 20:46:16 xtraeme Exp $ */
/*
@@ -67,8 +67,8 @@ off_t sblockloc;
static off_t sblock_try[] = SBLOCKSEARCH;
-static void bwrite(daddr64_t, char *, int, const char *);
-static void bread(daddr64_t, char *, int, const char *);
+static void bwrite(daddr_t, char *, int, const char *);
+static void bread(daddr_t, char *, int, const char *);
static int getnum(const char *, const char *, int, int);
static void getsb(struct fs *, const char *);
static int openpartition(char *, int, char **);
@@ -292,7 +292,7 @@ getsb(struct fs *fs, const char *file)
}
static void
-bwrite(daddr64_t blk, char *buffer, int size, const char *file)
+bwrite(daddr_t blk, char *buffer, int size, const char *file)
{
off_t offset;
@@ -304,7 +304,7 @@ bwrite(daddr64_t blk, char *buffer, int size, const char *file)
}
static void
-bread(daddr64_t blk, char *buffer, int cnt, const char *file)
+bread(daddr_t blk, char *buffer, int cnt, const char *file)
{
off_t offset;
int i;