summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
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/alpha
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/alpha')
-rw-r--r--sys/arch/alpha/stand/boot/disk.c6
-rw-r--r--sys/arch/alpha/stand/boot/disk.h4
-rw-r--r--sys/arch/alpha/stand/installboot.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/alpha/stand/boot/disk.c b/sys/arch/alpha/stand/boot/disk.c
index 58f186f0cc7..af3be1adbc1 100644
--- a/sys/arch/alpha/stand/boot/disk.c
+++ b/sys/arch/alpha/stand/boot/disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disk.c,v 1.11 2003/06/02 23:27:44 millert Exp $ */
+/* $OpenBSD: disk.c,v 1.12 2011/03/13 00:13:52 deraadt Exp $ */
/* $NetBSD: disk.c,v 1.6 1997/04/06 08:40:33 cgd Exp $ */
/*
@@ -57,7 +57,7 @@ int
diskstrategy(devdata, rw, bn, reqcnt, addrvoid, cnt)
void *devdata;
int rw;
- daddr_t bn;
+ daddr32_t bn;
size_t reqcnt;
void *addrvoid;
size_t *cnt; /* out: number of bytes transferred */
@@ -135,7 +135,7 @@ diskopen(f, ctlr, unit, part)
lp->d_partitions[part].p_offset = 0;
lp->d_partitions[part].p_size = 0x7fffffff;
i = diskstrategy(sc, F_READ,
- (daddr_t)LABELSECTOR, DEV_BSIZE, buf, &cnt);
+ (daddr32_t)LABELSECTOR, DEV_BSIZE, buf, &cnt);
if (i || cnt != DEV_BSIZE) {
printf("disk%d: error reading disk label\n", unit);
goto bad;
diff --git a/sys/arch/alpha/stand/boot/disk.h b/sys/arch/alpha/stand/boot/disk.h
index 68ff7bda459..17f57613612 100644
--- a/sys/arch/alpha/stand/boot/disk.h
+++ b/sys/arch/alpha/stand/boot/disk.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: disk.h,v 1.4 2002/03/14 01:26:27 millert Exp $ */
+/* $OpenBSD: disk.h,v 1.5 2011/03/13 00:13:52 deraadt Exp $ */
/* $NetBSD: disk.h,v 1.1 1995/11/23 02:39:42 cgd Exp $ */
-int diskstrategy(void *, int, daddr_t, size_t, void *, size_t *);
+int diskstrategy(void *, int, daddr32_t, size_t, void *, size_t *);
/* int diskopen(struct open_file *, int, int, int); */
int diskclose(struct open_file *);
diff --git a/sys/arch/alpha/stand/installboot.c b/sys/arch/alpha/stand/installboot.c
index c3f05949ed8..cecfcd3bd80 100644
--- a/sys/arch/alpha/stand/installboot.c
+++ b/sys/arch/alpha/stand/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.15 2009/08/24 08:52:13 jasper Exp $ */
+/* $OpenBSD: installboot.c,v 1.16 2011/03/13 00:13:51 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.2 1997/04/06 08:41:12 cgd Exp $ */
/*
@@ -68,7 +68,7 @@ int max_block_count;
char *loadprotoblocks(char *, long *);
int loadblocknums(char *, int, unsigned long);
-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 *[]);
@@ -302,7 +302,7 @@ loadprotoblocks(char *fname, long *size)
}
static void
-devread(int fd, void *buf, daddr_t blk, size_t size, char *msg)
+devread(int fd, void *buf, daddr32_t blk, size_t size, char *msg)
{
if (lseek(fd, dbtob(blk), SEEK_SET) != dbtob(blk))
err(1, "%s: devread: lseek", msg);
@@ -321,7 +321,7 @@ loadblocknums(char *boot, int devfd, unsigned long partoffset)
struct statfs statfsbuf;
struct fs *fs;
char *buf;
- daddr_t blk, *ap;
+ daddr32_t blk, *ap;
struct ufs1_dinode *ip;
int32_t cksum;
@@ -426,7 +426,7 @@ loadblocknums(char *boot, int devfd, unsigned long partoffset)
blk = ip->di_ib[0];
devread(devfd, buf, blk + partoffset, 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);
bbinfop->blocks[i] = blk + partoffset;