summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/growfs/debug.c24
-rw-r--r--sbin/growfs/growfs.c40
-rw-r--r--sys/ufs/ufs/dinode.h3
3 files changed, 33 insertions, 34 deletions
diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c
index db46e7a08b5..b9109daf770 100644
--- a/sbin/growfs/debug.c
+++ b/sbin/growfs/debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: debug.c,v 1.5 2007/03/19 13:27:47 pedro Exp $ */
+/* $OpenBSD: debug.c,v 1.6 2007/06/01 19:26:06 deraadt Exp $ */
/*
* Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
* Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
@@ -43,7 +43,7 @@
#ifndef lint
static const char rcsid[] =
- "$OpenBSD: debug.c,v 1.5 2007/03/19 13:27:47 pedro Exp $";
+ "$OpenBSD: debug.c,v 1.6 2007/06/01 19:26:06 deraadt Exp $";
#endif /* not lint */
/* ********************************************************** INCLUDES ***** */
@@ -147,13 +147,13 @@ dbg_dump_fs(struct fs *sb, const char *comment)
fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)sb, comment);
indent++;
- fprintf(dbg_log, "sblkno ufs_daddr_t 0x%08x\n",
+ fprintf(dbg_log, "sblkno int32_t 0x%08x\n",
sb->fs_sblkno);
- fprintf(dbg_log, "cblkno ufs_daddr_t 0x%08x\n",
+ fprintf(dbg_log, "cblkno int32_t 0x%08x\n",
sb->fs_cblkno);
- fprintf(dbg_log, "iblkno ufs_daddr_t 0x%08x\n",
+ fprintf(dbg_log, "iblkno int32_t 0x%08x\n",
sb->fs_iblkno);
- fprintf(dbg_log, "dblkno ufs_daddr_t 0x%08x\n",
+ fprintf(dbg_log, "dblkno int32_t 0x%08x\n",
sb->fs_dblkno);
fprintf(dbg_log, "cgoffset int32_t 0x%08x\n",
@@ -226,7 +226,7 @@ dbg_dump_fs(struct fs *sb, const char *comment)
fprintf(dbg_log, "id int32_t[2] %08x %08x\n",
sb->fs_id[0], sb->fs_id[1]);
- fprintf(dbg_log, "csaddr ufs_daddr_t 0x%08x\n",
+ fprintf(dbg_log, "csaddr int32_t 0x%08x\n",
sb->fs_ffs1_csaddr);
fprintf(dbg_log, "cssize int32_t 0x%08x\n",
sb->fs_cssize);
@@ -630,24 +630,24 @@ dbg_dump_ino(struct fs *sb, const char *comment, struct ufs1_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 ufs_daddr_t[%x] 0x%08x\n", ictr,
+ fprintf(dbg_log, "db int32_t[%x] 0x%08x\n", ictr,
ino->di_db[ictr]);
}
remaining_blocks-=NDADDR;
if(remaining_blocks>0) {
- fprintf(dbg_log, "ib ufs_daddr_t[0] 0x%08x\n",
+ fprintf(dbg_log, "ib int32_t[0] 0x%08x\n",
ino->di_ib[0]);
}
- remaining_blocks-=howmany(sb->fs_bsize, sizeof(ufs_daddr_t));
+ remaining_blocks-=howmany(sb->fs_bsize, sizeof(int32_t));
if(remaining_blocks>0) {
- fprintf(dbg_log, "ib ufs_daddr_t[1] 0x%08x\n",
+ fprintf(dbg_log, "ib int32_t[1] 0x%08x\n",
ino->di_ib[1]);
}
#define SQUARE(a) ((a)*(a))
remaining_blocks-=SQUARE(howmany(sb->fs_bsize, sizeof(ufs_daddr_t)));
#undef SQUARE
if(remaining_blocks>0) {
- fprintf(dbg_log, "ib ufs_daddr_t[2] 0x%08x\n",
+ fprintf(dbg_log, "ib int32_t[2] 0x%08x\n",
ino->di_ib[2]);
}
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 83b6668edc9..5baaf04b04a 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: growfs.c,v 1.19 2007/05/29 06:28:16 otto Exp $ */
+/* $OpenBSD: growfs.c,v 1.20 2007/06/01 19:26:06 deraadt Exp $ */
/*
* Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
* Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
@@ -46,7 +46,7 @@ static const char copyright[] =
Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\
All rights reserved.\n";
-static const char rcsid[] = "$OpenBSD: growfs.c,v 1.19 2007/05/29 06:28:16 otto Exp $";
+static const char rcsid[] = "$OpenBSD: growfs.c,v 1.20 2007/06/01 19:26:06 deraadt Exp $";
#endif /* not lint */
/* ********************************************************** INCLUDES ***** */
@@ -142,7 +142,7 @@ static struct disklabel *get_disklabel(int);
static void return_disklabel(int, struct disklabel *, unsigned int);
static struct ufs1_dinode *ginode(ino_t, int, int);
static void frag_adjust(daddr_t, int);
-static void cond_bl_upd(ufs_daddr_t *, struct gfs_bpp *,
+static void cond_bl_upd(int32_t *, struct gfs_bpp *,
enum pointer_source, int, unsigned int);
static void updclst(int);
static void updrefs(int, ino_t, struct gfs_bpp *, int, int, unsigned int);
@@ -565,7 +565,7 @@ frag_adjust(daddr_t frag, int sign)
* out if a write back operation is needed.
*/
static void
-cond_bl_upd(ufs_daddr_t *block, struct gfs_bpp *field,
+cond_bl_upd(int32_t *block, struct gfs_bpp *field,
enum pointer_source source, int fso, unsigned int Nflag)
{
DBG_FUNC("cond_bl_upd")
@@ -1780,7 +1780,7 @@ static struct ufs1_dinode *
ginode(ino_t inumber, int fsi, int cg)
{
DBG_FUNC("ginode")
- ufs_daddr_t iblk;
+ int32_t iblk;
static ino_t startinum = 0; /* first inode in cached block */
struct ufs1_dinode *pi;
@@ -2242,7 +2242,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
{
DBG_FUNC("updrefs")
unsigned int ictr, ind2ctr, ind3ctr;
- ufs_daddr_t *iptr, *ind2ptr, *ind3ptr;
+ int32_t *iptr, *ind2ptr, *ind3ptr;
struct ufs1_dinode *ino;
int remaining_blocks;
@@ -2298,9 +2298,9 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
i1_src = fsbtodb(&sblock, ino->di_ib[0]);
rdfs(i1_src, (size_t)sblock.fs_bsize, &i1blk, fsi);
for (ictr = 0; ictr < MIN(howmany(sblock.fs_bsize,
- sizeof(ufs_daddr_t)), (unsigned int)remaining_blocks);
+ sizeof(int32_t)), (unsigned int)remaining_blocks);
ictr++) {
- iptr = &((ufs_daddr_t *)&i1blk)[ictr];
+ iptr = &((int32_t *)&i1blk)[ictr];
if (*iptr) {
cond_bl_upd(iptr, bp, GFS_PS_IND_BLK_LVL1,
fso, Nflag);
@@ -2309,7 +2309,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
}
DBG_PRINT0("scg indirect_1 blocks checked\n");
- remaining_blocks -= howmany(sblock.fs_bsize, sizeof(ufs_daddr_t));
+ remaining_blocks -= howmany(sblock.fs_bsize, sizeof(int32_t));
if (remaining_blocks<0) {
DBG_LEAVE;
return;
@@ -2322,8 +2322,8 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
i2_src = fsbtodb(&sblock, ino->di_ib[1]);
rdfs(i2_src, (size_t)sblock.fs_bsize, &i2blk, fsi);
for (ind2ctr = 0; ind2ctr < howmany(sblock.fs_bsize,
- sizeof(ufs_daddr_t)); ind2ctr++) {
- ind2ptr = &((ufs_daddr_t *)&i2blk)[ind2ctr];
+ sizeof(int32_t)); ind2ctr++) {
+ ind2ptr = &((int32_t *)&i2blk)[ind2ctr];
if (!*ind2ptr)
continue;
cond_bl_upd(ind2ptr, bp, GFS_PS_IND_BLK_LVL2, fso,
@@ -2332,9 +2332,9 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
rdfs(i1_src, (size_t)sblock.fs_bsize, &i1blk,
fsi);
for (ictr = 0; ictr < MIN(howmany((unsigned int)
- sblock.fs_bsize, sizeof(ufs_daddr_t)),
+ sblock.fs_bsize, sizeof(int32_t)),
(unsigned int)remaining_blocks); ictr++) {
- iptr = &((ufs_daddr_t *)&i1blk)[ictr];
+ iptr = &((int32_t *)&i1blk)[ictr];
if (*iptr) {
cond_bl_upd(iptr, bp,
GFS_PS_IND_BLK_LVL1, fso, Nflag);
@@ -2345,7 +2345,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
DBG_PRINT0("scg indirect_2 blocks checked\n");
#define SQUARE(a) ((a)*(a))
- remaining_blocks -= SQUARE(howmany(sblock.fs_bsize, sizeof(ufs_daddr_t)));
+ remaining_blocks -= SQUARE(howmany(sblock.fs_bsize, sizeof(int32_t)));
#undef SQUARE
if (remaining_blocks < 0) {
DBG_LEAVE;
@@ -2360,8 +2360,8 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
i3_src = fsbtodb(&sblock, ino->di_ib[2]);
rdfs(i3_src, (size_t)sblock.fs_bsize, &i3blk, fsi);
for (ind3ctr = 0; ind3ctr < howmany(sblock.fs_bsize,
- sizeof(ufs_daddr_t)); ind3ctr++) {
- ind3ptr = &((ufs_daddr_t *)&i3blk)[ind3ctr];
+ sizeof(int32_t)); ind3ctr++) {
+ ind3ptr = &((int32_t *)&i3blk)[ind3ctr];
if (!*ind3ptr)
continue;
cond_bl_upd(ind3ptr, bp, GFS_PS_IND_BLK_LVL3, fso,
@@ -2370,8 +2370,8 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
rdfs(i2_src, (size_t)sblock.fs_bsize, &i2blk,
fsi);
for (ind2ctr = 0; ind2ctr < howmany(sblock.fs_bsize,
- sizeof(ufs_daddr_t)); ind2ctr++) {
- ind2ptr = &((ufs_daddr_t *)&i2blk)[ind2ctr];
+ sizeof(int32_t)); ind2ctr++) {
+ ind2ptr = &((int32_t *)&i2blk)[ind2ctr];
if (!*ind2ptr)
continue;
cond_bl_upd(ind2ptr, bp, GFS_PS_IND_BLK_LVL2,
@@ -2380,9 +2380,9 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
rdfs(i1_src, (size_t)sblock.fs_bsize,
&i1blk, fsi);
for (ictr = 0; ictr < MIN(howmany(sblock.fs_bsize,
- sizeof(ufs_daddr_t)),
+ sizeof(int32_t)),
(unsigned int)remaining_blocks); ictr++) {
- iptr = &((ufs_daddr_t *)&i1blk)[ictr];
+ iptr = &((int32_t *)&i1blk)[ictr];
if (*iptr) {
cond_bl_upd(iptr, bp,
GFS_PS_IND_BLK_LVL1, fso,
diff --git a/sys/ufs/ufs/dinode.h b/sys/ufs/ufs/dinode.h
index 4d0f3e32d92..fc2610f670d 100644
--- a/sys/ufs/ufs/dinode.h
+++ b/sys/ufs/ufs/dinode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dinode.h,v 1.14 2007/06/01 18:54:27 pedro Exp $ */
+/* $OpenBSD: dinode.h,v 1.15 2007/06/01 19:26:05 deraadt Exp $ */
/* $NetBSD: dinode.h,v 1.7 1995/06/15 23:22:48 cgd Exp $ */
/*
@@ -55,7 +55,6 @@
* are defined by types with precise widths.
*/
-typedef int32_t ufs_daddr_t;
typedef int32_t ufs1_daddr_t;
typedef int64_t ufs_lbn_t;