summaryrefslogtreecommitdiff
path: root/sys/arch/mvmeppc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-03-13 00:13:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-03-13 00:13:54 +0000
commit498cf2cbf80b299bf6c21307d98f424374b5b18c (patch)
tree8553045f12ef69e9aaafd5e8e87dfa1fbe23c284 /sys/arch/mvmeppc
parent87ac327e012b105ceaf428b26525cfa462ccd835 (diff)
Change daddr_t to daddr32_t. The bootblocks on our architectures only
do 32-bit block spanning. If later on we get some that can/should do 64-bit, that can be done now using daddr64_t (but of course, we are taking this step to finalize the daddr_t 64-bit conversion). ok miod krw
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r--sys/arch/mvmeppc/stand/bootxx/bootxx.c4
-rw-r--r--sys/arch/mvmeppc/stand/installboot/installboot.c14
-rw-r--r--sys/arch/mvmeppc/stand/libsa/bugdev.c10
-rw-r--r--sys/arch/mvmeppc/stand/libsa/libsa.h8
-rw-r--r--sys/arch/mvmeppc/stand/libsa/rawfs.c4
-rw-r--r--sys/arch/mvmeppc/stand/libsa/tftpfs.c8
6 files changed, 24 insertions, 24 deletions
diff --git a/sys/arch/mvmeppc/stand/bootxx/bootxx.c b/sys/arch/mvmeppc/stand/bootxx/bootxx.c
index c39339e550d..9824ff04148 100644
--- a/sys/arch/mvmeppc/stand/bootxx/bootxx.c
+++ b/sys/arch/mvmeppc/stand/bootxx/bootxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootxx.c,v 1.2 2002/03/14 03:15:58 millert Exp $ */
+/* $OpenBSD: bootxx.c,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */
/*
* Copyright (c) 1994 Paul Kranenburg
@@ -63,7 +63,7 @@
*/
int block_size = 512; /* default */
int block_count = MAXBLOCKNUM; /* length of table */
-daddr_t block_table[MAXBLOCKNUM] = { 0 };
+daddr32_t block_table[MAXBLOCKNUM] = { 0 };
extern char *version;
diff --git a/sys/arch/mvmeppc/stand/installboot/installboot.c b/sys/arch/mvmeppc/stand/installboot/installboot.c
index a093cc9583b..910471911ae 100644
--- a/sys/arch/mvmeppc/stand/installboot/installboot.c
+++ b/sys/arch/mvmeppc/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.7 2010/11/19 18:11:21 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.8 2011/03/13 00:13:53 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -65,13 +65,13 @@ struct nlist nl[] = {
int *block_size_p; /* block size var. in prototype image */
int *block_count_p; /* block count var. in prototype image */
-daddr_t *block_table; /* block number array in prototype image */
+daddr32_t *block_table; /* block number array in prototype image */
int maxblocknum; /* size of this array */
char *loadprotoblocks(char *, long *);
int loadblocknums(char *, int);
-static void devread(int, void *, daddr_t, size_t, char *);
+static void devread(int, void *, daddr32_t, size_t, char *);
static void usage(void);
int main(int, char *[]);
static void vid_to_disklabel(char *, char *);
@@ -246,7 +246,7 @@ loadprotoblocks(fname, size)
off = N_DATOFF(eh) - N_DATADDR(eh) - (eh.a_entry - N_TXTADDR(eh));
block_size_p = (int *) (bp + nl[X_BLOCK_SIZE ].n_value + off);
block_count_p = (int *) (bp + nl[X_BLOCK_COUNT].n_value + off);
- block_table = (daddr_t *) (bp + nl[X_BLOCK_TABLE].n_value + off);
+ block_table = (daddr32_t *) (bp + nl[X_BLOCK_TABLE].n_value + off);
maxblocknum = *block_count_p;
if (verbose) {
@@ -273,7 +273,7 @@ static void
devread(fd, buf, blk, size, msg)
int fd;
void *buf;
- daddr_t blk;
+ daddr32_t blk;
size_t size;
char *msg;
{
@@ -296,7 +296,7 @@ int devfd;
struct statfs statfsbuf;
struct fs *fs;
char *buf;
- daddr_t blk, *ap;
+ daddr32_t blk, *ap;
struct dinode *ip;
int ndb;
@@ -376,7 +376,7 @@ int devfd;
*/
blk = fsbtodb(fs, ip->di_ib[0]);
devread(devfd, buf, blk, fs->fs_bsize, "indirect block");
- ap = (daddr_t *)buf;
+ ap = (daddr32_t *)buf;
for (; i < NINDIR(fs) && *ap && ndb; i++, ap++, ndb--) {
blk = fsbtodb(fs, *ap);
if (verbose)
diff --git a/sys/arch/mvmeppc/stand/libsa/bugdev.c b/sys/arch/mvmeppc/stand/libsa/bugdev.c
index f5b466a5d25..bbec816af40 100644
--- a/sys/arch/mvmeppc/stand/libsa/bugdev.c
+++ b/sys/arch/mvmeppc/stand/libsa/bugdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bugdev.c,v 1.4 2006/10/12 12:14:17 krw Exp $ */
+/* $OpenBSD: bugdev.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -321,14 +321,14 @@ int
dsk_strategy(devdata, func, dblk, size, buf, rsize)
void *devdata;
int func;
- daddr_t dblk;
+ daddr32_t dblk;
size_t size;
void *buf;
size_t *rsize;
{
struct mvmeprom_dskio dio;
register struct bugdev_softc *pp = (struct bugdev_softc *)devdata;
- daddr_t blk = dblk + pp->poff;
+ daddr32_t blk = dblk + pp->poff;
twiddle();
@@ -391,7 +391,7 @@ int
net_strategy(devdata, func, nblk, size, buf, rsize)
void *devdata;
int func;
- daddr_t nblk;
+ daddr32_t nblk;
size_t size;
void *buf;
size_t *rsize;
@@ -570,7 +570,7 @@ int
tape_strategy(devdata, flag, dblk, size, buf, rsize)
void *devdata;
int flag;
- daddr_t dblk;
+ daddr32_t dblk;
size_t size;
void *buf;
size_t *rsize;
diff --git a/sys/arch/mvmeppc/stand/libsa/libsa.h b/sys/arch/mvmeppc/stand/libsa/libsa.h
index 153583cb967..a355dff48b5 100644
--- a/sys/arch/mvmeppc/stand/libsa/libsa.h
+++ b/sys/arch/mvmeppc/stand/libsa/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.3 2002/03/14 01:26:41 millert Exp $ */
+/* $OpenBSD: libsa.h,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */
/*
* libsa prototypes
@@ -10,15 +10,15 @@
int dsk_open(struct open_file *, ...);
int dsk_close(struct open_file *);
int dsk_ioctl(struct open_file *, u_long, void *);
-int dsk_strategy(void *, int, daddr_t, size_t, void *, size_t *);
+int dsk_strategy(void *, int, daddr32_t, size_t, void *, size_t *);
int net_open(struct open_file *, ...);
int net_close(struct open_file *);
int net_ioctl(struct open_file *, u_long, void *);
-int net_strategy(void *, int, daddr_t, size_t, void *, size_t *);
+int net_strategy(void *, int, daddr32_t, size_t, void *, size_t *);
int tape_open(struct open_file *, ...);
int tape_close(struct open_file *);
int tape_ioctl(struct open_file *, u_long, void *);
-int tape_strategy(void *, int, daddr_t, size_t, void *, size_t *);
+int tape_strategy(void *, int, daddr32_t, size_t, void *, size_t *);
/* exec_mvme.c */
void exec_mvme(char *, int);
diff --git a/sys/arch/mvmeppc/stand/libsa/rawfs.c b/sys/arch/mvmeppc/stand/libsa/rawfs.c
index 3682697b0be..a2bf6dc329f 100644
--- a/sys/arch/mvmeppc/stand/libsa/rawfs.c
+++ b/sys/arch/mvmeppc/stand/libsa/rawfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rawfs.c,v 1.2 2002/03/14 01:26:41 millert Exp $ */
+/* $OpenBSD: rawfs.c,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -48,7 +48,7 @@
* In-core open file.
*/
struct cfile {
- daddr_t fs_nextblk; /* block number to read next */
+ daddr32_t fs_nextblk; /* block number to read next */
int fs_len; /* amount left in f_buf */
char * fs_ptr; /* read pointer into f_buf */
char fs_buf[RAWFS_BSIZE];
diff --git a/sys/arch/mvmeppc/stand/libsa/tftpfs.c b/sys/arch/mvmeppc/stand/libsa/tftpfs.c
index 637d8811650..0370f93b7fd 100644
--- a/sys/arch/mvmeppc/stand/libsa/tftpfs.c
+++ b/sys/arch/mvmeppc/stand/libsa/tftpfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftpfs.c,v 1.4 2006/08/13 23:08:44 miod Exp $ */
+/* $OpenBSD: tftpfs.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */
/*-
* Copyright (c) 2001 Steve Murphree, Jr.
@@ -50,7 +50,7 @@ struct tftp_file {
off_t f_seekp; /* seek pointer */
char *f_buf; /* buffer for data block */
off_t f_off; /* index into buffer for data block */
- daddr_t f_buf_blkno; /* block number of data block */
+ daddr32_t f_buf_blkno; /* block number of data block */
size_t f_buf_size;
};
@@ -60,7 +60,7 @@ struct tftp_file {
#define TFTP_BLOCK_OFF(x) (x % TFTP_BLOCK_SIZE)
static int read_inode(ino_t, struct open_file *);
-static int block_map(struct open_file *, daddr_t, daddr_t *);
+static int block_map(struct open_file *, daddr32_t, daddr32_t *);
static int tftp_read_file(struct open_file *, char **, size_t *);
/*
@@ -79,7 +79,7 @@ tftp_read_file(f, buf_p, size_p)
{
register struct tftp_file *fp = (struct tftp_file *)f->f_fsdata;
long off;
- register daddr_t file_block;
+ register daddr32_t file_block;
size_t block_size;
int i, rc;