summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
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/sparc64
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/sparc64')
-rw-r--r--sys/arch/sparc64/stand/installboot/installboot.c14
-rw-r--r--sys/arch/sparc64/stand/ofwboot/ofdev.c4
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/sparc64/stand/installboot/installboot.c b/sys/arch/sparc64/stand/installboot/installboot.c
index 1b94d2193a9..bbfeb35d493 100644
--- a/sys/arch/sparc64/stand/installboot/installboot.c
+++ b/sys/arch/sparc64/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.9 2010/11/20 13:10:42 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.10 2011/03/13 00:13:53 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.8 2001/02/19 22:48:59 cgd Exp $ */
/*-
@@ -74,14 +74,14 @@ struct nlist nl[] = {
{ {SYMNAME("block_size")} },
{ {NULL} }
};
-daddr_t *block_table; /* block number array in prototype image */
+daddr32_t *block_table; /* block number array in prototype image */
int32_t *block_count_p; /* size of this array */
int32_t *block_size_p; /* filesystem block size */
int32_t max_block_count;
char *loadprotoblocks(char *, size_t *);
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 *[]);
@@ -283,7 +283,7 @@ loadprotoblocks(fname, size)
}
(void)close(fd);
- block_table = (daddr_t *) (bp + nl[X_BLOCKTABLE].n_value - st);
+ block_table = (daddr32_t *) (bp + nl[X_BLOCKTABLE].n_value - st);
block_count_p = (int32_t *)(bp + nl[X_BLOCKCOUNT].n_value - st);
block_size_p = (int32_t *) (bp + nl[X_BLOCKSIZE].n_value - st);
if ((int)(u_long)block_table & 3) {
@@ -342,7 +342,7 @@ static void
devread(fd, buf, blk, size, msg)
int fd;
void *buf;
- daddr_t blk;
+ daddr32_t blk;
size_t size;
char *msg;
{
@@ -365,7 +365,7 @@ int devfd;
struct statfs statfsbuf;
struct fs *fs;
char *buf;
- daddr_t blk, *ap;
+ daddr32_t blk, *ap;
struct ufs1_dinode *ip;
int ndb;
@@ -444,7 +444,7 @@ int devfd;
printf("%s: block numbers (indirect): ", boot);
blk = 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);
block_table[i] = blk;
diff --git a/sys/arch/sparc64/stand/ofwboot/ofdev.c b/sys/arch/sparc64/stand/ofwboot/ofdev.c
index 89c52d5ca70..30fdcb33445 100644
--- a/sys/arch/sparc64/stand/ofwboot/ofdev.c
+++ b/sys/arch/sparc64/stand/ofwboot/ofdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdev.c,v 1.16 2010/09/08 15:25:43 jsing Exp $ */
+/* $OpenBSD: ofdev.c,v 1.17 2011/03/13 00:13:53 deraadt Exp $ */
/* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */
/*
@@ -107,7 +107,7 @@ filename(char *str, char *ppart)
}
static int
-strategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
+strategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf,
size_t *rsize)
{
struct of_dev *dev = devdata;