diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-13 00:13:54 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-13 00:13:54 +0000 |
commit | 498cf2cbf80b299bf6c21307d98f424374b5b18c (patch) | |
tree | 8553045f12ef69e9aaafd5e8e87dfa1fbe23c284 /sys/arch/i386/stand | |
parent | 87ac327e012b105ceaf428b26525cfa462ccd835 (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/i386/stand')
-rw-r--r-- | sys/arch/i386/stand/installboot/installboot.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/biosdev.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/biosdev.h | 6 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/pxe_net.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/pxe_net.h | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c index 7998ebccae2..7cd28b2a078 100644 --- a/sys/arch/i386/stand/installboot/installboot.c +++ b/sys/arch/i386/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.57 2011/03/08 17:24:31 krw Exp $ */ +/* $OpenBSD: installboot.c,v 1.58 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -99,7 +99,7 @@ struct sym_data pbr_symbols[] = { static char *loadproto(char *, long *); static int getbootparams(char *, int, struct disklabel *); -static void devread(int, void *, daddr_t, size_t, char *); +static void devread(int, void *, daddr64_t, size_t, char *); static void sym_set_value(struct sym_data *, char *, u_int32_t); static void pbr_set_symbols(char *, char *, struct sym_data *); static void usage(void); @@ -376,7 +376,7 @@ loadproto(char *fname, long *size) } static void -devread(int fd, void *buf, daddr_t blk, size_t size, char *msg) +devread(int fd, void *buf, daddr64_t blk, size_t size, char *msg) { if (lseek(fd, dbtob((off_t)blk), SEEK_SET) != dbtob((off_t)blk)) err(1, "%s: devread: lseek", msg); @@ -400,7 +400,7 @@ getbootparams(char *boot, int devfd, struct disklabel *dl) struct partition *pl; struct fs *fs; char *buf; - daddr_t blk, *ap; + u_int blk, *ap; struct ufs1_dinode *ip; int ndb; int mib[3]; diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index ed35066079c..385b0cc2b90 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.79 2011/03/11 21:08:25 krw Exp $ */ +/* $OpenBSD: biosdev.c,v 1.80 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -35,9 +35,9 @@ #include <machine/biosvar.h> #include <lib/libsa/saerrno.h> #include <isofs/cd9660/iso.h> +#include "libsa.h" #include "disk.h" #include "debug.h" -#include "libsa.h" #include "biosdev.h" static const char *biosdisk_err(u_int); @@ -246,7 +246,7 @@ EDD_rw(int rw, int dev, u_int64_t daddr, u_int32_t nblk, void *buf) * Read given sector, handling retry/errors/etc. */ int -biosd_io(int rw, bios_diskinfo_t *bd, daddr_t off, int nsect, void *buf) +biosd_io(int rw, bios_diskinfo_t *bd, daddr32_t off, int nsect, void *buf) { int dev = bd->bios_number; int j, error; @@ -439,7 +439,7 @@ bios_getdisklabel(bios_diskinfo_t *bd, struct disklabel *label) printf("loading disklabel @ %lld\n", start); #endif /* read disklabel */ - error = biosd_io(F_READ, bd, (daddr_t)start, 1, buf); + error = biosd_io(F_READ, bd, (daddr32_t)start, 1, buf); if (error) return "failed to read disklabel"; @@ -648,7 +648,7 @@ biosdisk_errno(u_int error) } int -biosstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf, +biosstrategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf, size_t *rsize) { struct diskinfo *dip = (struct diskinfo *)devdata; diff --git a/sys/arch/i386/stand/libsa/biosdev.h b/sys/arch/i386/stand/libsa/biosdev.h index 1c6629e356a..88463c927f9 100644 --- a/sys/arch/i386/stand/libsa/biosdev.h +++ b/sys/arch/i386/stand/libsa/biosdev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.h,v 1.31 2007/04/27 10:08:34 tom Exp $ */ +/* $OpenBSD: biosdev.h,v 1.32 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -44,12 +44,12 @@ struct open_file; /* biosdev.c */ extern const char *biosdevs[]; -int biosstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int biosstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int biosopen(struct open_file *, ...); int biosclose(struct open_file *); int biosioctl(struct open_file *, u_long, void *); int bios_getdiskinfo(int, bios_diskinfo_t *); -int biosd_io(int, bios_diskinfo_t *, daddr_t, int, void *); +int biosd_io(int, bios_diskinfo_t *, daddr32_t, int, void *); const char * bios_getdisklabel(bios_diskinfo_t *, struct disklabel *); /* diskprobe.c */ diff --git a/sys/arch/i386/stand/libsa/pxe_net.c b/sys/arch/i386/stand/libsa/pxe_net.c index 4f7f27e6fb8..331efeb1a21 100644 --- a/sys/arch/i386/stand/libsa/pxe_net.c +++ b/sys/arch/i386/stand/libsa/pxe_net.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxe_net.c,v 1.3 2008/06/26 05:42:11 ray Exp $ */ +/* $OpenBSD: pxe_net.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: dev_net.c,v 1.4 2003/03/12 13:15:08 drochner Exp $ */ /*- @@ -144,7 +144,7 @@ net_ioctl(struct open_file *f, u_long cmd, void *data) } int -net_strategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf, +net_strategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf, size_t *rsize) { return EIO; diff --git a/sys/arch/i386/stand/libsa/pxe_net.h b/sys/arch/i386/stand/libsa/pxe_net.h index 79542d731e0..e70e4503947 100644 --- a/sys/arch/i386/stand/libsa/pxe_net.h +++ b/sys/arch/i386/stand/libsa/pxe_net.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pxe_net.h,v 1.2 2008/06/26 05:42:11 ray Exp $ */ +/* $OpenBSD: pxe_net.h,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD$ */ /*- @@ -34,4 +34,4 @@ 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 *); |