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 | |
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
104 files changed, 328 insertions, 330 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; diff --git a/sys/arch/amd64/stand/installboot/installboot.c b/sys/arch/amd64/stand/installboot/installboot.c index 0bd465bb936..75142e8bd90 100644 --- a/sys/arch/amd64/stand/installboot/installboot.c +++ b/sys/arch/amd64/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.14 2011/03/08 17:24:31 krw Exp $ */ +/* $OpenBSD: installboot.c,v 1.15 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -103,7 +103,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); @@ -380,7 +380,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); @@ -404,7 +404,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/amd64/stand/libsa/biosdev.c b/sys/arch/amd64/stand/libsa/biosdev.c index 2a111a9c918..c44c84da20b 100644 --- a/sys/arch/amd64/stand/libsa/biosdev.c +++ b/sys/arch/amd64/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.11 2011/03/11 21:08:25 krw Exp $ */ +/* $OpenBSD: biosdev.c,v 1.12 2011/03/13 00:13:52 deraadt Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -243,7 +243,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; @@ -436,7 +436,7 @@ bios_getdisklabel(bios_diskinfo_t *bd, struct disklabel *label) printf("loading disklabel @ %u\n", off); #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"); @@ -645,7 +645,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/amd64/stand/libsa/biosdev.h b/sys/arch/amd64/stand/libsa/biosdev.h index 4f2287d7948..765ba0d0e59 100644 --- a/sys/arch/amd64/stand/libsa/biosdev.h +++ b/sys/arch/amd64/stand/libsa/biosdev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.h,v 1.2 2007/04/28 19:23:10 deraadt Exp $ */ +/* $OpenBSD: biosdev.h,v 1.3 2011/03/13 00:13:52 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/amd64/stand/libsa/pxe_net.c b/sys/arch/amd64/stand/libsa/pxe_net.c index 0dacee7e554..1a398d61bc3 100644 --- a/sys/arch/amd64/stand/libsa/pxe_net.c +++ b/sys/arch/amd64/stand/libsa/pxe_net.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxe_net.c,v 1.2 2008/06/26 05:42:09 ray Exp $ */ +/* $OpenBSD: pxe_net.c,v 1.3 2011/03/13 00:13:52 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/amd64/stand/libsa/pxe_net.h b/sys/arch/amd64/stand/libsa/pxe_net.h index 6749d6bd7f2..49efe81560d 100644 --- a/sys/arch/amd64/stand/libsa/pxe_net.h +++ b/sys/arch/amd64/stand/libsa/pxe_net.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pxe_net.h,v 1.2 2008/06/26 05:42:09 ray Exp $ */ +/* $OpenBSD: pxe_net.h,v 1.3 2011/03/13 00:13:52 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 *); diff --git a/sys/arch/armish/stand/boot/libsa.h b/sys/arch/armish/stand/boot/libsa.h index db8403024ac..e0bd0e594fc 100644 --- a/sys/arch/armish/stand/boot/libsa.h +++ b/sys/arch/armish/stand/boot/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.1 2006/07/29 15:01:49 kettenis Exp $ */ +/* $OpenBSD: libsa.h,v 1.2 2011/03/13 00:13:52 deraadt Exp $ */ /* * Copyright (c) 2006 Mark Kettenis @@ -37,6 +37,6 @@ void com_putc(dev_t, int); /* * wd */ -int wdstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int wdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int wdopen(struct open_file *, ...); int wdclose(struct open_file *); diff --git a/sys/arch/armish/stand/boot/wd.c b/sys/arch/armish/stand/boot/wd.c index e9bca776dd1..1f9e9cc3da9 100644 --- a/sys/arch/armish/stand/boot/wd.c +++ b/sys/arch/armish/stand/boot/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.8 2010/04/23 15:25:20 jsing Exp $ */ +/* $OpenBSD: wd.c,v 1.9 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: wd.c,v 1.5 2005/12/11 12:17:06 christos Exp $ */ /*- @@ -263,13 +263,13 @@ int wdstrategy(f, rw, dblk, size, buf, rsize) void *f; int rw; - daddr_t dblk; + daddr32_t dblk; size_t size; void *buf; size_t *rsize; { int i, nsect; - daddr_t blkno; + daddr32_t blkno; struct wd_softc *wd = f; if (size == 0) diff --git a/sys/arch/armish/stand/boot/wdc.c b/sys/arch/armish/stand/boot/wdc.c index ce9775f26f9..12cf16f5a86 100644 --- a/sys/arch/armish/stand/boot/wdc.c +++ b/sys/arch/armish/stand/boot/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.3 2008/06/26 05:42:10 ray Exp $ */ +/* $OpenBSD: wdc.c,v 1.4 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: wdc.c,v 1.7 2005/12/11 12:17:06 christos Exp $ */ /*- @@ -330,7 +330,7 @@ int wdc_exec_read(wd, cmd, blkno, data) struct wd_softc *wd; u_int8_t cmd; - daddr_t blkno; + daddr32_t blkno; void *data; { int error; diff --git a/sys/arch/armish/stand/boot/wdvar.h b/sys/arch/armish/stand/boot/wdvar.h index 7ab338b7f8f..2718a445e02 100644 --- a/sys/arch/armish/stand/boot/wdvar.h +++ b/sys/arch/armish/stand/boot/wdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdvar.h,v 1.2 2006/07/29 15:01:49 kettenis Exp $ */ +/* $OpenBSD: wdvar.h,v 1.3 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: wdvar.h,v 1.6 2005/12/11 12:17:06 christos Exp $ */ /*- @@ -126,7 +126,7 @@ struct wdc_command { int wdc_init (struct wd_softc*, u_int); int wdccommand (struct wd_softc*, struct wdc_command*); int wdccommandext (struct wd_softc*, struct wdc_command*); -int wdc_exec_read (struct wd_softc*, u_int8_t, daddr_t, void*); +int wdc_exec_read (struct wd_softc*, u_int8_t, daddr32_t, void*); int wdc_exec_identify (struct wd_softc*, void*); int pciide_init (struct wdc_channel*, u_int); diff --git a/sys/arch/hp300/stand/cdboot/conf.c b/sys/arch/hp300/stand/cdboot/conf.c index dd1a4759649..123a57554f2 100644 --- a/sys/arch/hp300/stand/cdboot/conf.c +++ b/sys/arch/hp300/stand/cdboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.5 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.6 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: conf.c,v 1.12 1996/10/14 07:29:15 thorpej Exp $ */ /* @@ -45,13 +45,13 @@ int debug = 0; /* XXX */ /* * Device configuration */ -int sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int sdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int sdopen(struct open_file *, ...); int sdclose(struct open_file *); #define sdioctl noioctl #define xxstrategy \ - (int (*)(void *, int, daddr_t, size_t, void *, size_t *))nullsys + (int (*)(void *, int, daddr32_t, size_t, void *, size_t *))nullsys #define xxopen (int (*)(struct open_file *, ...))nodev #define xxclose (int (*)(struct open_file *))nullsys diff --git a/sys/arch/hp300/stand/common/ct.c b/sys/arch/hp300/stand/common/ct.c index c0c04c05b56..8db58fee3b7 100644 --- a/sys/arch/hp300/stand/common/ct.c +++ b/sys/arch/hp300/stand/common/ct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ct.c,v 1.5 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: ct.c,v 1.6 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: ct.c,v 1.9 1996/10/14 07:29:57 thorpej Exp $ */ /* @@ -68,7 +68,7 @@ int ctident(int, int); int ctinit(int, int); int ctopen(struct open_file *, int, int, int); int ctpunit(int, int, int *); -int ctstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int ctstrategy(void *, int, daddr32_t, size_t, void *, size_t *); char ctio_buf[MAXBSIZE]; @@ -211,7 +211,7 @@ ctclose(struct open_file *f) } int -ctstrategy(void *devdata, int func, daddr_t dblk, size_t size, void *v_buf, +ctstrategy(void *devdata, int func, daddr32_t dblk, size_t size, void *v_buf, size_t *rsize) { struct ct_softc *rs = devdata; diff --git a/sys/arch/hp300/stand/common/hd.c b/sys/arch/hp300/stand/common/hd.c index b1576ff95b4..3f46e70b241 100644 --- a/sys/arch/hp300/stand/common/hd.c +++ b/sys/arch/hp300/stand/common/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.6 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: hd.c,v 1.7 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: rd.c,v 1.11 1996/12/21 21:34:40 thorpej Exp $ */ /* @@ -110,7 +110,7 @@ int hdident(int, int); int hdinit(int, int); int hdopen(struct open_file *, int, int, int); void hdreset(int, int); -int hdstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int hdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int hdinit(int ctlr, int unit) @@ -287,14 +287,14 @@ hdclose(struct open_file *f) } int -hdstrategy(void *devdata, int func, daddr_t dblk, size_t size, void *v_buf, +hdstrategy(void *devdata, int func, daddr32_t dblk, size_t size, void *v_buf, size_t *rsize) { char *buf = v_buf; struct hd_softc *rs = devdata; int ctlr = rs->sc_ctlr; int unit = rs->sc_unit; - daddr_t blk; + daddr32_t blk; char stat; if (size == 0) diff --git a/sys/arch/hp300/stand/common/scsi.c b/sys/arch/hp300/stand/common/scsi.c index ee6b0cddf8a..bd9384aa6b1 100644 --- a/sys/arch/hp300/stand/common/scsi.c +++ b/sys/arch/hp300/stand/common/scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi.c,v 1.6 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: scsi.c,v 1.7 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: scsi.c,v 1.7 1997/01/30 10:32:57 thorpej Exp $ */ /* @@ -391,7 +391,7 @@ scsi_read_capacity(int ctlr, int slave, u_char *buf, u_int len) } int -scsi_tt_read(int ctlr, int slave, u_char *buf, u_int len, daddr_t blk, +scsi_tt_read(int ctlr, int slave, u_char *buf, u_int len, daddr32_t blk, u_int nblk) { struct scsi_softc *hs = &scsi_softc[ctlr]; @@ -410,7 +410,7 @@ scsi_tt_read(int ctlr, int slave, u_char *buf, u_int len, daddr_t blk, } int -scsi_tt_write(int ctlr, int slave, u_char *buf, u_int len, daddr_t blk, +scsi_tt_write(int ctlr, int slave, u_char *buf, u_int len, daddr32_t blk, u_int nblk) { struct scsi_softc *hs = &scsi_softc[ctlr]; diff --git a/sys/arch/hp300/stand/common/sd.c b/sys/arch/hp300/stand/common/sd.c index f73f8b4b758..fb69a9f52d0 100644 --- a/sys/arch/hp300/stand/common/sd.c +++ b/sys/arch/hp300/stand/common/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.6 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: sd.c,v 1.7 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: sd.c,v 1.9 1996/12/21 21:34:41 thorpej Exp $ */ /* @@ -75,7 +75,7 @@ int sdgetinfo(struct sd_softc *); int sdinit(int, int); int sdopen(struct open_file *, int, int, int); void sdreset(int, int); -int sdstrategy(struct sd_softc *, int, daddr_t, size_t, void *, size_t *); +int sdstrategy(struct sd_softc *, int, daddr32_t, size_t, void *, size_t *); int sdinit(int ctlr, int unit) @@ -215,14 +215,14 @@ sdclose(struct open_file *f) } int -sdstrategy(struct sd_softc *ss, int func, daddr_t dblk, size_t size, +sdstrategy(struct sd_softc *ss, int func, daddr32_t dblk, size_t size, void *v_buf, size_t *rsize) { char *buf = v_buf; int ctlr = ss->sc_ctlr; int unit = ss->sc_unit; u_int nblk = size >> ss->sc_blkshift; - daddr_t blk; + daddr32_t blk; char stat; if (size == 0) diff --git a/sys/arch/hp300/stand/include/scsireg.h b/sys/arch/hp300/stand/include/scsireg.h index 4351dcc92ec..77a2e30c845 100644 --- a/sys/arch/hp300/stand/include/scsireg.h +++ b/sys/arch/hp300/stand/include/scsireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsireg.h,v 1.2 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: scsireg.h,v 1.3 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: scsireg.h,v 1.4 1994/10/26 07:24:59 cgd Exp $ */ /* @@ -479,5 +479,5 @@ struct scsi_fmt_sense { int scsialive(int); int scsi_read_capacity(int, int, u_char *, u_int); int scsi_test_unit_rdy(int, int); -int scsi_tt_read(int, int, u_char *, u_int, daddr_t, u_int); -int scsi_tt_write(int, int, u_char *, u_int, daddr_t, u_int); +int scsi_tt_read(int, int, u_char *, u_int, daddr32_t, u_int); +int scsi_tt_write(int, int, u_char *, u_int, daddr32_t, u_int); diff --git a/sys/arch/hp300/stand/libsa/rawfs.c b/sys/arch/hp300/stand/libsa/rawfs.c index 12dcbd1ec92..9c27263aee7 100644 --- a/sys/arch/hp300/stand/libsa/rawfs.c +++ b/sys/arch/hp300/stand/libsa/rawfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rawfs.c,v 1.4 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: rawfs.c,v 1.5 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: rawfs.c,v 1.2 1996/10/06 19:07:53 thorpej Exp $ */ /* @@ -53,7 +53,7 @@ extern int debug; * In-core open file. */ struct rawfs_file { - 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/hp300/stand/uboot/conf.c b/sys/arch/hp300/stand/uboot/conf.c index f46d505cebf..19f2740175b 100644 --- a/sys/arch/hp300/stand/uboot/conf.c +++ b/sys/arch/hp300/stand/uboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.6 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.7 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: conf.c,v 1.12 1996/10/14 07:29:15 thorpej Exp $ */ /* @@ -54,28 +54,28 @@ int debug = 0; /* XXX */ /* * Device configuration */ -int netstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int netstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int netopen(struct open_file *, ...); int netclose(struct open_file *); #define netioctl noioctl -int ctstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int ctstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int ctopen(struct open_file *, ...); int ctclose(struct open_file *); #define ctioctl noioctl -int hdstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int hdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int hdopen(struct open_file *, ...); int hdclose(struct open_file *); #define hdioctl noioctl -int sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int sdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int sdopen(struct open_file *, ...); int sdclose(struct open_file *); #define sdioctl noioctl #define xxstrategy \ - (int (*)(void *, int, daddr_t, size_t, void *, size_t *))nullsys + (int (*)(void *, int, daddr32_t, size_t, void *, size_t *))nullsys #define xxopen (int (*)(struct open_file *, ...))nodev #define xxclose (int (*)(struct open_file *))nullsys diff --git a/sys/arch/hp300/stand/uboot/netio.c b/sys/arch/hp300/stand/uboot/netio.c index 835e99f971c..2b74173bb40 100644 --- a/sys/arch/hp300/stand/uboot/netio.c +++ b/sys/arch/hp300/stand/uboot/netio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netio.c,v 1.3 2006/08/17 06:31:10 miod Exp $ */ +/* $OpenBSD: netio.c,v 1.4 2011/03/13 00:13:52 deraadt Exp $ */ /* $NetBSD: netio.c,v 1.5 1997/01/30 10:32:56 thorpej Exp $ */ /* @@ -85,7 +85,7 @@ static char input_line[100]; int netclose(struct open_file *); int netmountroot(struct open_file *, char *); int netopen(struct open_file *, char *); -int netstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int netstrategy(void *, int, daddr32_t, size_t, void *, size_t *); /* * Called by devopen after it sets f->f_dev to our devsw entry. @@ -121,7 +121,7 @@ netclose(struct open_file *f) } int -netstrategy(void *devdata, int func, daddr_t dblk, size_t size, void *v_buf, +netstrategy(void *devdata, int func, daddr32_t dblk, size_t size, void *v_buf, size_t *rsize) { diff --git a/sys/arch/hppa/stand/libsa/dev_hppa.h b/sys/arch/hppa/stand/libsa/dev_hppa.h index 2c006dce33c..5e9bcf1613f 100644 --- a/sys/arch/hppa/stand/libsa/dev_hppa.h +++ b/sys/arch/hppa/stand/libsa/dev_hppa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_hppa.h,v 1.8 2003/08/11 06:51:45 mickey Exp $ */ +/* $OpenBSD: dev_hppa.h,v 1.9 2011/03/13 00:13:52 deraadt Exp $ */ #define IOPGSHIFT 11 @@ -9,8 +9,8 @@ struct disklabel; struct hppa_dev { dev_t bootdev; struct pz_device *pz_dev; /* device descriptor */ - daddr_t fsoff; /* offset to the file system */ - daddr_t last_blk; /* byte offset for last read blk */ + daddr32_t fsoff; /* offset to the file system */ + daddr32_t last_blk; /* byte offset for last read blk */ size_t last_read; /* amount read last time */ struct disklabel *label; /* buffer to cache data (aligned properly) */ diff --git a/sys/arch/hppa/stand/libsa/libsa.h b/sys/arch/hppa/stand/libsa/libsa.h index a5c4f02b615..5428c30bb01 100644 --- a/sys/arch/hppa/stand/libsa/libsa.h +++ b/sys/arch/hppa/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.13 2004/04/07 18:24:20 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.14 2011/03/13 00:13:52 deraadt Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -39,7 +39,7 @@ void pdc_init(void); struct pz_device; struct pz_device *pdc_findev(int, int); -int iodcstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int iodcstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int ctopen(struct open_file *, ...); int ctclose(struct open_file *); @@ -48,7 +48,7 @@ int dkopen(struct open_file *, ...); int dkclose(struct open_file *); int lfopen(struct open_file *, ...); -int lfstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int lfstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int lfclose(struct open_file *); void ite_probe(struct consdev *); diff --git a/sys/arch/hppa/stand/libsa/pdc.c b/sys/arch/hppa/stand/libsa/pdc.c index 7c4b51123aa..a91f619baef 100644 --- a/sys/arch/hppa/stand/libsa/pdc.c +++ b/sys/arch/hppa/stand/libsa/pdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdc.c,v 1.19 2005/04/07 00:21:51 mickey Exp $ */ +/* $OpenBSD: pdc.c,v 1.20 2011/03/13 00:13:52 deraadt Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -128,7 +128,7 @@ int iodcstrategy(devdata, rw, blk, size, buf, rsize) void *devdata; int rw; - daddr_t blk; + daddr32_t blk; size_t size; void *buf; size_t *rsize; diff --git a/sys/arch/hppa64/stand/libsa/dev_hppa64.h b/sys/arch/hppa64/stand/libsa/dev_hppa64.h index a47daa2173a..1a019cb872d 100644 --- a/sys/arch/hppa64/stand/libsa/dev_hppa64.h +++ b/sys/arch/hppa64/stand/libsa/dev_hppa64.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_hppa64.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */ +/* $OpenBSD: dev_hppa64.h,v 1.2 2011/03/13 00:13:52 deraadt Exp $ */ #define IOPGSHIFT 11 @@ -9,8 +9,8 @@ struct disklabel; struct hppa_dev { dev_t bootdev; struct pz_device *pz_dev; /* device descriptor */ - daddr_t fsoff; /* offset to the file system */ - daddr_t last_blk; /* byte offset for last read blk */ + daddr32_t fsoff; /* offset to the file system */ + daddr32_t last_blk; /* byte offset for last read blk */ size_t last_read; /* amount read last time */ struct disklabel *label; /* buffer to cache data (aligned properly) */ diff --git a/sys/arch/hppa64/stand/libsa/libsa.h b/sys/arch/hppa64/stand/libsa/libsa.h index 9952a35a383..148fa7a2076 100644 --- a/sys/arch/hppa64/stand/libsa/libsa.h +++ b/sys/arch/hppa64/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.2 2011/03/13 00:13:52 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -30,7 +30,7 @@ void pdc_init(void); struct pz_device; struct pz_device *pdc_findev(int, int); -int iodcstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int iodcstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int ctopen(struct open_file *, ...); int ctclose(struct open_file *); @@ -39,7 +39,7 @@ int dkopen(struct open_file *, ...); int dkclose(struct open_file *); int lfopen(struct open_file *, ...); -int lfstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int lfstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int lfclose(struct open_file *); void ite_probe(struct consdev *); diff --git a/sys/arch/hppa64/stand/libsa/pdc.c b/sys/arch/hppa64/stand/libsa/pdc.c index 1569c52a1dd..5ff24400bb8 100644 --- a/sys/arch/hppa64/stand/libsa/pdc.c +++ b/sys/arch/hppa64/stand/libsa/pdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdc.c,v 1.1 2005/04/01 10:40:48 mickey Exp $ */ +/* $OpenBSD: pdc.c,v 1.2 2011/03/13 00:13:52 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -119,7 +119,7 @@ int iodcstrategy(devdata, rw, blk, size, buf, rsize) void *devdata; int rw; - daddr_t blk; + daddr32_t blk; size_t size; void *buf; size_t *rsize; 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 *); diff --git a/sys/arch/landisk/stand/boot/devs.c b/sys/arch/landisk/stand/boot/devs.c index 9c5927b5d24..dd0120e0c07 100644 --- a/sys/arch/landisk/stand/boot/devs.c +++ b/sys/arch/landisk/stand/boot/devs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: devs.c,v 1.6 2006/11/16 23:12:56 deraadt Exp $ */ +/* $OpenBSD: devs.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2006 Michael Shalayeff @@ -90,7 +90,7 @@ blkdevopen(struct open_file *f, ...) } int -blkdevstrategy(void *v, int flag, daddr_t dblk, size_t size, void *buf, size_t *rsize) +blkdevstrategy(void *v, int flag, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { if (flag != F_READ) diff --git a/sys/arch/landisk/stand/boot/libsa.h b/sys/arch/landisk/stand/boot/libsa.h index 75a640911ab..fa6158fbce6 100644 --- a/sys/arch/landisk/stand/boot/libsa.h +++ b/sys/arch/landisk/stand/boot/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.3 2006/10/29 14:47:59 drahn Exp $ */ +/* $OpenBSD: libsa.h,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2006 Michael Shalayeff @@ -28,7 +28,7 @@ int readsects(int dev, uint32_t lba, void *buf, size_t size); int blkdevopen(struct open_file *, ...); int blkdevclose(struct open_file *); -int blkdevstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int blkdevstrategy(void *, int, daddr32_t, size_t, void *, size_t *); void scif_init(unsigned int); int scif_getc(void); void scif_putc(int); diff --git a/sys/arch/landisk/stand/xxboot/boot1.c b/sys/arch/landisk/stand/xxboot/boot1.c index ff4394564c3..12391b04d2e 100644 --- a/sys/arch/landisk/stand/xxboot/boot1.c +++ b/sys/arch/landisk/stand/xxboot/boot1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot1.c,v 1.5 2010/12/06 22:51:46 jasper Exp $ */ +/* $OpenBSD: boot1.c,v 1.6 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: boot1.c,v 1.1 2006/09/01 21:26:19 uwe Exp $ */ /*- @@ -44,7 +44,7 @@ static uint32_t bios_sector; const char *boot1(uint32_t *); void putstr(const char *str); int raise(int sig); -int blkdevstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int blkdevstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int blkdevopen(struct open_file *, ...); int blkdevclose(struct open_file *); @@ -118,7 +118,7 @@ blkdevclose(struct open_file *f) } int -blkdevstrategy(void *devdata, int flag, daddr_t dblk, size_t size, void *buf, size_t *rsize) +blkdevstrategy(void *devdata, int flag, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { if (flag != F_READ) diff --git a/sys/arch/loongson/stand/boot/dev.c b/sys/arch/loongson/stand/boot/dev.c index c60791c8326..94b3616fd27 100644 --- a/sys/arch/loongson/stand/boot/dev.c +++ b/sys/arch/loongson/stand/boot/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.2 2010/02/16 21:28:39 miod Exp $ */ +/* $OpenBSD: dev.c,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -67,7 +67,7 @@ struct pmon_iodata { int pmon_getdisklabel(struct pmon_iodata *pi); int -pmon_iostrategy(void *f, int rw, daddr_t dblk, size_t size, void *buf, +pmon_iostrategy(void *f, int rw, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct pmon_iodata *pi = (struct pmon_iodata *)f; diff --git a/sys/arch/loongson/stand/boot/libsa.h b/sys/arch/loongson/stand/boot/libsa.h index 8ba7fc90391..7a3bc9eaccf 100644 --- a/sys/arch/loongson/stand/boot/libsa.h +++ b/sys/arch/loongson/stand/boot/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.4 2010/04/03 19:13:27 miod Exp $ */ +/* $OpenBSD: libsa.h,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -41,14 +41,14 @@ void pmon_cnputc(dev_t, int); /* * PMON I/O */ -int pmon_iostrategy(void *, int, daddr_t, size_t, void *, size_t *); +int pmon_iostrategy(void *, int, daddr32_t, size_t, void *, size_t *); int pmon_ioopen(struct open_file *, ...); int pmon_ioclose(struct open_file *); /* * INITRD I/O */ -int rd_iostrategy(void *, int, daddr_t, size_t, void *, size_t *); +int rd_iostrategy(void *, int, daddr32_t, size_t, void *, size_t *); int rd_ioopen(struct open_file *, ...); int rd_ioclose(struct open_file *); int rd_isvalid(void); diff --git a/sys/arch/loongson/stand/boot/rd.c b/sys/arch/loongson/stand/boot/rd.c index 87c045a4464..f179342bcf9 100644 --- a/sys/arch/loongson/stand/boot/rd.c +++ b/sys/arch/loongson/stand/boot/rd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rd.c,v 1.2 2010/04/03 19:13:27 miod Exp $ */ +/* $OpenBSD: rd.c,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -29,7 +29,7 @@ static off_t rdoffs; */ int -rd_iostrategy(void *f, int rw, daddr_t dblk, size_t size, void *buf, +rd_iostrategy(void *f, int rw, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { /* never invoked directly */ diff --git a/sys/arch/macppc/stand/ofdev.c b/sys/arch/macppc/stand/ofdev.c index fe2e0a2f85b..75aad9cdaad 100644 --- a/sys/arch/macppc/stand/ofdev.c +++ b/sys/arch/macppc/stand/ofdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofdev.c,v 1.16 2010/05/14 19:32:39 drahn Exp $ */ +/* $OpenBSD: ofdev.c,v 1.17 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: ofdev.c,v 1.1 1997/04/16 20:29:20 thorpej Exp $ */ /* @@ -70,7 +70,7 @@ filename(char *str) } 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; diff --git a/sys/arch/mvme68k/stand/bootst/dev_tape.c b/sys/arch/mvme68k/stand/bootst/dev_tape.c index b2edf7b5747..9ea5166c83a 100644 --- a/sys/arch/mvme68k/stand/bootst/dev_tape.c +++ b/sys/arch/mvme68k/stand/bootst/dev_tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_tape.c,v 1.3 2002/03/14 03:15:56 millert Exp $ */ +/* $OpenBSD: dev_tape.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: dev_tape.c,v 1.2 1995/10/17 22:58:20 gwr Exp $ */ /* @@ -127,7 +127,7 @@ int tape_strategy(devdata, flag, dblk, size, buf, rsize) void *devdata; int flag; - daddr_t dblk; + daddr32_t dblk; u_int size; char *buf; u_int *rsize; diff --git a/sys/arch/mvme68k/stand/bootst/dev_tape.h b/sys/arch/mvme68k/stand/bootst/dev_tape.h index 9404db80701..6c3fc658be8 100644 --- a/sys/arch/mvme68k/stand/bootst/dev_tape.h +++ b/sys/arch/mvme68k/stand/bootst/dev_tape.h @@ -1,8 +1,8 @@ -/* $OpenBSD: dev_tape.h,v 1.3 2002/03/14 01:26:38 millert Exp $ */ +/* $OpenBSD: dev_tape.h,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ int tape_open(struct open_file *, ...); int tape_close(struct open_file *); -int tape_strategy(void *, int, daddr_t, size_t, void *, size_t *); +int tape_strategy(void *, int, daddr32_t, size_t, void *, size_t *); int tape_ioctl(); diff --git a/sys/arch/mvme68k/stand/bootst/rawfs.c b/sys/arch/mvme68k/stand/bootst/rawfs.c index b119b419ab4..0243f66ff33 100644 --- a/sys/arch/mvme68k/stand/bootst/rawfs.c +++ b/sys/arch/mvme68k/stand/bootst/rawfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rawfs.c,v 1.4 2006/01/16 18:03:54 deraadt Exp $ */ +/* $OpenBSD: rawfs.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: rawfs.c,v 1.1 1995/10/17 22:58:27 gwr Exp $ */ /* @@ -51,7 +51,7 @@ extern int debug; * In-core open file. */ struct file { - 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/mvme68k/stand/bootxx/bootxx.c b/sys/arch/mvme68k/stand/bootxx/bootxx.c index 57a963b4291..2050e7710fb 100644 --- a/sys/arch/mvme68k/stand/bootxx/bootxx.c +++ b/sys/arch/mvme68k/stand/bootxx/bootxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootxx.c,v 1.7 2003/08/20 00:24:43 deraadt Exp $ */ +/* $OpenBSD: bootxx.c,v 1.8 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: bootxx.c,v 1.5 1995/10/13 21:44:57 gwr Exp $ */ /* @@ -67,7 +67,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/mvme68k/stand/installboot/installboot.c b/sys/arch/mvme68k/stand/installboot/installboot.c index fadceec218c..de66a3885dc 100644 --- a/sys/arch/mvme68k/stand/installboot/installboot.c +++ b/sys/arch/mvme68k/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.14 2010/11/20 13:10:41 deraadt Exp $ */ +/* $OpenBSD: installboot.c,v 1.15 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 *); @@ -244,7 +244,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) { @@ -268,7 +268,7 @@ loadprotoblocks(fname, 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); @@ -287,7 +287,7 @@ loadblocknums(char *boot, int devfd) struct statfs statfsbuf; struct fs *fs; char *buf; - daddr_t blk, *ap; + daddr32_t blk, *ap; struct ufs1_dinode *ip; int ndb; @@ -369,7 +369,7 @@ loadblocknums(char *boot, 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/mvme68k/stand/libsa/bugdev.c b/sys/arch/mvme68k/stand/libsa/bugdev.c index a9c96b59569..03200d54e41 100644 --- a/sys/arch/mvme68k/stand/libsa/bugdev.c +++ b/sys/arch/mvme68k/stand/libsa/bugdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugdev.c,v 1.6 2010/04/23 15:25:20 jsing Exp $ */ +/* $OpenBSD: bugdev.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -97,12 +97,12 @@ devopen(struct open_file *f, const char *fname, char **file) #define BUG_SCALE (512/BUG_BLOCK_SIZE) int -bugscstrategy(void *devdata, int func, daddr_t dblk, size_t size, void *buf, +bugscstrategy(void *devdata, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct mvmeprom_dskio dio; register struct bugsc_softc *pp = (struct bugsc_softc *)devdata; - daddr_t blk = dblk + pp->poff; + daddr32_t blk = dblk + pp->poff; twiddle(); diff --git a/sys/arch/mvme68k/stand/libsa/libsa.h b/sys/arch/mvme68k/stand/libsa/libsa.h index 3d355a73c1d..99473844a35 100644 --- a/sys/arch/mvme68k/stand/libsa/libsa.h +++ b/sys/arch/mvme68k/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.6 2003/08/20 00:26:00 deraadt Exp $ */ +/* $OpenBSD: libsa.h,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* * libsa prototypes @@ -10,7 +10,7 @@ int bugscopen(struct open_file *); int bugscclose(struct open_file *); int bugscioctl(struct open_file *, u_long, void *); -int bugscstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int bugscstrategy(void *, int, daddr32_t, size_t, void *, size_t *); /* exec_mvme.c */ void exec_mvme(char *, int); diff --git a/sys/arch/mvme68k/stand/netboot/dev_net.c b/sys/arch/mvme68k/stand/netboot/dev_net.c index 77ce339a9d0..27ddf254540 100644 --- a/sys/arch/mvme68k/stand/netboot/dev_net.c +++ b/sys/arch/mvme68k/stand/netboot/dev_net.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_net.c,v 1.8 2003/08/20 00:26:00 deraadt Exp $ */ +/* $OpenBSD: dev_net.c,v 1.9 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -202,7 +202,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/mvme68k/stand/netboot/dev_net.h b/sys/arch/mvme68k/stand/netboot/dev_net.h index 3fac461175a..fd374dd6bd1 100644 --- a/sys/arch/mvme68k/stand/netboot/dev_net.h +++ b/sys/arch/mvme68k/stand/netboot/dev_net.h @@ -1,8 +1,8 @@ -/* $OpenBSD: dev_net.h,v 1.4 2003/08/20 00:26:00 deraadt Exp $ */ +/* $OpenBSD: dev_net.h,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ int net_open(struct open_file *, char *); 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 *); void machdep_common_ether(u_char *); diff --git a/sys/arch/mvme88k/stand/bootst/dev_tape.c b/sys/arch/mvme88k/stand/bootst/dev_tape.c index 792ded19ac9..d6e9c3debc4 100644 --- a/sys/arch/mvme88k/stand/bootst/dev_tape.c +++ b/sys/arch/mvme88k/stand/bootst/dev_tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_tape.c,v 1.3 2006/05/16 22:52:09 miod Exp $ */ +/* $OpenBSD: dev_tape.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -127,7 +127,7 @@ int tape_strategy(devdata, flag, dblk, size, buf, rsize) void *devdata; int flag; - daddr_t dblk; + daddr32_t dblk; u_int size; char *buf; u_int *rsize; diff --git a/sys/arch/mvme88k/stand/bootst/dev_tape.h b/sys/arch/mvme88k/stand/bootst/dev_tape.h index 63896916220..84f01ab7897 100644 --- a/sys/arch/mvme88k/stand/bootst/dev_tape.h +++ b/sys/arch/mvme88k/stand/bootst/dev_tape.h @@ -1,7 +1,7 @@ -/* $OpenBSD: dev_tape.h,v 1.2 2002/03/14 01:26:40 millert Exp $ */ +/* $OpenBSD: dev_tape.h,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ int tape_open(struct open_file *, ...); int tape_close(struct open_file *); -int tape_strategy(void *, int, daddr_t, size_t, void *, size_t *); +int tape_strategy(void *, int, daddr32_t, size_t, void *, size_t *); int tape_ioctl(); diff --git a/sys/arch/mvme88k/stand/bootst/rawfs.c b/sys/arch/mvme88k/stand/bootst/rawfs.c index abf23291c35..1e43a73ab6f 100644 --- a/sys/arch/mvme88k/stand/bootst/rawfs.c +++ b/sys/arch/mvme88k/stand/bootst/rawfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rawfs.c,v 1.4 2006/05/16 22:52:09 miod Exp $ */ +/* $OpenBSD: rawfs.c,v 1.5 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/mvme88k/stand/bootxx/bootxx.c b/sys/arch/mvme88k/stand/bootxx/bootxx.c index b18943c6e64..10f1f7e9a48 100644 --- a/sys/arch/mvme88k/stand/bootxx/bootxx.c +++ b/sys/arch/mvme88k/stand/bootxx/bootxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootxx.c,v 1.8 2008/09/19 20:18:03 miod Exp $ */ +/* $OpenBSD: bootxx.c,v 1.9 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1994 Paul Kranenburg @@ -63,7 +63,7 @@ */ size_t block_size = 512; /* default */ int block_count = MAXBLOCKNUM; /* length of table */ -daddr_t block_table[MAXBLOCKNUM] = { 0 }; +daddr32_t block_table[MAXBLOCKNUM] = { 0 }; void bugexec(void (*)()); int copyboot(struct open_file *, char *); diff --git a/sys/arch/mvme88k/stand/installboot/installboot.c b/sys/arch/mvme88k/stand/installboot/installboot.c index 8eaecb3a1e8..01dec8b3486 100644 --- a/sys/arch/mvme88k/stand/installboot/installboot.c +++ b/sys/arch/mvme88k/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.13 2010/12/07 18:11:07 miod Exp $ */ +/* $OpenBSD: installboot.c,v 1.14 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 ufs1_dinode *ip; int ndb; @@ -378,7 +378,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/mvme88k/stand/libsa/bugdev.c b/sys/arch/mvme88k/stand/libsa/bugdev.c index 33cc1ffb09c..fcff1c6d829 100644 --- a/sys/arch/mvme88k/stand/libsa/bugdev.c +++ b/sys/arch/mvme88k/stand/libsa/bugdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugdev.c,v 1.6 2010/04/23 15:25:20 jsing Exp $ */ +/* $OpenBSD: bugdev.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -103,14 +103,14 @@ int bugscstrategy(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 bugsc_softc *pp = (struct bugsc_softc *)devdata; - daddr_t blk = dblk + pp->poff; + daddr32_t blk = dblk + pp->poff; twiddle(); diff --git a/sys/arch/mvme88k/stand/libsa/libsa.h b/sys/arch/mvme88k/stand/libsa/libsa.h index 97ceb024443..8653ee3d3ac 100644 --- a/sys/arch/mvme88k/stand/libsa/libsa.h +++ b/sys/arch/mvme88k/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.5 2008/09/19 20:18:03 miod Exp $ */ +/* $OpenBSD: libsa.h,v 1.6 2011/03/13 00:13:53 deraadt Exp $ */ /* * libsa prototypes @@ -13,7 +13,7 @@ void board_setup(); int bugscopen(struct open_file *, ...); int bugscclose(struct open_file *); int bugscioctl(struct open_file *, u_long, void *); -int bugscstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int bugscstrategy(void *, int, daddr32_t, size_t, void *, size_t *); /* exec_mvme.c */ void exec_mvme(char *, int); diff --git a/sys/arch/mvme88k/stand/tftpboot/netdev.c b/sys/arch/mvme88k/stand/tftpboot/netdev.c index 9c50bd76798..9bb15ec9d5c 100644 --- a/sys/arch/mvme88k/stand/tftpboot/netdev.c +++ b/sys/arch/mvme88k/stand/tftpboot/netdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netdev.c,v 1.2 2006/05/16 22:52:09 miod Exp $ */ +/* $OpenBSD: netdev.c,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -67,7 +67,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; diff --git a/sys/arch/mvme88k/stand/tftpboot/netdev.h b/sys/arch/mvme88k/stand/tftpboot/netdev.h index 4d9b1abc797..261f99adc09 100644 --- a/sys/arch/mvme88k/stand/tftpboot/netdev.h +++ b/sys/arch/mvme88k/stand/tftpboot/netdev.h @@ -1,6 +1,6 @@ -/* $OpenBSD: netdev.h,v 1.1 2004/01/26 19:48:34 miod Exp $ */ +/* $OpenBSD: netdev.h,v 1.2 2011/03/13 00:13:53 deraadt Exp $ */ 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 *); diff --git a/sys/arch/mvme88k/stand/tftpboot/tftpfs.c b/sys/arch/mvme88k/stand/tftpboot/tftpfs.c index 3a59fdcc035..af0d1ae41e5 100644 --- a/sys/arch/mvme88k/stand/tftpboot/tftpfs.c +++ b/sys/arch/mvme88k/stand/tftpboot/tftpfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpfs.c,v 1.4 2009/01/18 21:47:56 miod Exp $ */ +/* $OpenBSD: tftpfs.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /*- * Copyright (c) 2001 Steve Murphree, Jr. @@ -51,7 +51,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; }; @@ -78,7 +78,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; 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; diff --git a/sys/arch/sgi/stand/boot/conf.c b/sys/arch/sgi/stand/boot/conf.c index 2964476870f..caa763f7b8f 100644 --- a/sys/arch/sgi/stand/boot/conf.c +++ b/sys/arch/sgi/stand/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.3 2009/05/14 18:57:43 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -31,7 +31,7 @@ extern void nullsys(); extern int nodev(); extern int noioctl(); -int diostrategy(void *, int, daddr_t, size_t, void *, size_t *); +int diostrategy(void *, int, daddr32_t, size_t, void *, size_t *); int dioopen(struct open_file *, ...); int dioclose(struct open_file *); diff --git a/sys/arch/sgi/stand/boot/diskio.c b/sys/arch/sgi/stand/boot/diskio.c index 749794be0e5..e1bc49c51df 100644 --- a/sys/arch/sgi/stand/boot/diskio.c +++ b/sys/arch/sgi/stand/boot/diskio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskio.c,v 1.5 2009/07/15 20:34:57 martynas Exp $ */ +/* $OpenBSD: diskio.c,v 1.6 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2000 Opsycon AB (www.opsycon.se) @@ -45,7 +45,7 @@ struct dio_softc { }; int -diostrategy(void *devdata, int rw, daddr_t bn, u_int reqcnt, void *addr, +diostrategy(void *devdata, int rw, daddr32_t bn, u_int reqcnt, void *addr, size_t *cnt) { struct dio_softc *sc = (struct dio_softc *)devdata; @@ -73,7 +73,7 @@ dioopen(struct open_file *f, ...) struct dio_softc *sc; struct disklabel *lp; long fd; - daddr_t labelsector; + daddr32_t labelsector; va_list ap; va_start(ap, f); @@ -105,7 +105,7 @@ dioopen(struct open_file *f, ...) #if 0 /* Try to read disk label and partition table information. */ - i = diostrategy(sc, F_READ, (daddr_t)labelsector, DEV_BSIZE, buf, &cnt); + i = diostrategy(sc, F_READ, (daddr32_t)labelsector, DEV_BSIZE, buf, &cnt); if (i == 0 && cnt == DEV_BSIZE) msg = getdisklabel(buf, lp); diff --git a/sys/arch/socppc/stand/boot/libsa.h b/sys/arch/socppc/stand/boot/libsa.h index eabb1700485..e283b7d71a7 100644 --- a/sys/arch/socppc/stand/boot/libsa.h +++ b/sys/arch/socppc/stand/boot/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.1 2008/05/10 20:06:26 kettenis Exp $ */ +/* $OpenBSD: libsa.h,v 1.2 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -37,6 +37,6 @@ void com_putc(dev_t, int); /* * wd */ -int wdstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int wdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int wdopen(struct open_file *, ...); int wdclose(struct open_file *); diff --git a/sys/arch/socppc/stand/boot/wd.c b/sys/arch/socppc/stand/boot/wd.c index bb93e595d05..cabebd4dd5c 100644 --- a/sys/arch/socppc/stand/boot/wd.c +++ b/sys/arch/socppc/stand/boot/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.4 2010/04/23 15:25:21 jsing Exp $ */ +/* $OpenBSD: wd.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: wd.c,v 1.5 2005/12/11 12:17:06 christos Exp $ */ /*- @@ -281,13 +281,13 @@ int wdstrategy(f, rw, dblk, size, buf, rsize) void *f; int rw; - daddr_t dblk; + daddr32_t dblk; size_t size; void *buf; size_t *rsize; { int i, nsect; - daddr_t blkno; + daddr32_t blkno; struct wd_softc *wd = f; if (size == 0) diff --git a/sys/arch/socppc/stand/boot/wdc.c b/sys/arch/socppc/stand/boot/wdc.c index 28ac9ca8d8d..3a10c107a06 100644 --- a/sys/arch/socppc/stand/boot/wdc.c +++ b/sys/arch/socppc/stand/boot/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.3 2009/09/07 21:16:57 dms Exp $ */ +/* $OpenBSD: wdc.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: wdc.c,v 1.7 2005/12/11 12:17:06 christos Exp $ */ /*- @@ -334,7 +334,7 @@ int wdc_exec_read(wd, cmd, blkno, data) struct wd_softc *wd; u_int8_t cmd; - daddr_t blkno; + daddr32_t blkno; void *data; { int error; diff --git a/sys/arch/socppc/stand/boot/wdvar.h b/sys/arch/socppc/stand/boot/wdvar.h index e99319aff4e..aa7b997df71 100644 --- a/sys/arch/socppc/stand/boot/wdvar.h +++ b/sys/arch/socppc/stand/boot/wdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdvar.h,v 1.2 2009/09/07 21:16:57 dms Exp $ */ +/* $OpenBSD: wdvar.h,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: wdvar.h,v 1.6 2005/12/11 12:17:06 christos Exp $ */ /*- @@ -131,7 +131,7 @@ struct wdc_command { int wdc_init (struct wd_softc*, u_int); int wdccommand (struct wd_softc*, struct wdc_command*); int wdccommandext (struct wd_softc*, struct wdc_command*); -int wdc_exec_read (struct wd_softc*, u_int8_t, daddr_t, void*); +int wdc_exec_read (struct wd_softc*, u_int8_t, daddr32_t, void*); int wdc_exec_identify (struct wd_softc*, void*); diff --git a/sys/arch/sparc/stand/bootxx/bootxx.c b/sys/arch/sparc/stand/bootxx/bootxx.c index 4947ea8f0eb..e1510eee7e5 100644 --- a/sys/arch/sparc/stand/bootxx/bootxx.c +++ b/sys/arch/sparc/stand/bootxx/bootxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootxx.c,v 1.6 2010/06/29 21:33:54 miod Exp $ */ +/* $OpenBSD: bootxx.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: bootxx.c,v 1.2 1997/09/14 19:28:17 pk Exp $ */ /* @@ -57,7 +57,7 @@ struct open_file io; #define MAXBLOCKNUM 256 /* enough for a 2MB boot program (bs 8K) */ int32_t block_size = 0; int32_t block_count = MAXBLOCKNUM; -daddr_t block_table[MAXBLOCKNUM] = { 0 }; +daddr32_t block_table[MAXBLOCKNUM] = { 0 }; void loadboot(struct open_file *, caddr_t); @@ -89,7 +89,7 @@ loadboot(f, addr) register int i; register char *buf; size_t n; - daddr_t blk; + daddr32_t blk; /* * Allocate a buffer that we can map into DVMA space; only diff --git a/sys/arch/sparc/stand/common/promdev.c b/sys/arch/sparc/stand/common/promdev.c index e7197520bbe..490e7970adc 100644 --- a/sys/arch/sparc/stand/common/promdev.c +++ b/sys/arch/sparc/stand/common/promdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: promdev.c,v 1.12 2010/12/14 21:14:46 kettenis Exp $ */ +/* $OpenBSD: promdev.c,v 1.13 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: promdev.c,v 1.16 1995/11/14 15:04:01 pk Exp $ */ /* @@ -50,11 +50,11 @@ int obp_close(struct open_file *); -int obp_strategy(void *, int, daddr_t, size_t, void *, size_t *); +int obp_strategy(void *, int, daddr32_t, size_t, void *, size_t *); ssize_t obp_xmit(struct promdata *, void *, size_t); ssize_t obp_recv(struct promdata *, void *, size_t); int prom0_close(struct open_file *); -int prom0_strategy(void *, int, daddr_t, size_t, void *, size_t *); +int prom0_strategy(void *, int, daddr32_t, size_t, void *, size_t *); void prom0_iclose(struct saioreq *); int prom0_iopen(struct promdata *); ssize_t prom0_xmit(struct promdata *, void *, size_t); @@ -171,7 +171,7 @@ int obp_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; @@ -194,8 +194,8 @@ obp_strategy(devdata, flag, dblk, size, buf, rsize) (fd, buf, size); } else { int n = (*((flag == F_READ) ? - (u_int (*)(int, int, daddr_t, void *))promvec->pv_v0devops.v0_rbdev : - (u_int (*)(int, int, daddr_t, void *))promvec->pv_v0devops.v0_wbdev)) + (u_int (*)(int, int, daddr32_t, void *))promvec->pv_v0devops.v0_rbdev : + (u_int (*)(int, int, daddr32_t, void *))promvec->pv_v0devops.v0_wbdev)) (fd, btodb(size), dblk, buf); *rsize = dbtob(n); } @@ -213,7 +213,7 @@ int prom0_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/sparc/stand/installboot/installboot.c b/sys/arch/sparc/stand/installboot/installboot.c index da5632f81e6..2d04b870155 100644 --- a/sys/arch/sparc/stand/installboot/installboot.c +++ b/sys/arch/sparc/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.6 2011/03/12 19:40:34 deraadt Exp $ */ +/* $OpenBSD: installboot.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.1 1997/06/01 03:39:45 mrg Exp $ */ /* @@ -60,7 +60,7 @@ struct nlist nl[] = { {"_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; @@ -73,7 +73,7 @@ int isofseblk = 0; 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 *[]); @@ -263,7 +263,7 @@ loadprotoblocks(fname, size) /* Calculate the symbols' location within the proto file */ off = N_DATOFF(*hp) - N_DATADDR(*hp) - (hp->a_entry - N_TXTADDR(*hp)); - block_table = (daddr_t *) (bp + nl[X_BLOCKTABLE].n_value + off); + block_table = (daddr32_t *) (bp + nl[X_BLOCKTABLE].n_value + off); block_count_p = (int32_t *)(bp + nl[X_BLOCKCOUNT].n_value + off); block_size_p = (int32_t *) (bp + nl[X_BLOCKSIZE].n_value + off); if ((int)block_table & 3) { @@ -324,7 +324,7 @@ static void devread(fd, buf, blk, size, msg) int fd; void *buf; - daddr_t blk; + daddr32_t blk; size_t size; char *msg; { @@ -347,7 +347,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; @@ -446,7 +446,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/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; diff --git a/sys/arch/vax/boot/boot/conf.c b/sys/arch/vax/boot/boot/conf.c index 544d19ae36c..ec6a3777ddb 100644 --- a/sys/arch/vax/boot/boot/conf.c +++ b/sys/arch/vax/boot/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.4 2008/08/18 23:20:44 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: conf.c,v 1.10 2000/06/15 19:53:23 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -47,7 +47,7 @@ #include "vaxstand.h" -static int nostrategy(void *, int, daddr_t, size_t, void *, size_t *); +static int nostrategy(void *, int, daddr32_t, size_t, void *, size_t *); struct devsw devsw[]={ SADEV("hp",hpstrategy, hpopen, nullsys, noioctl), @@ -99,7 +99,7 @@ struct fs_ops file_system[] = { int nfsys = (sizeof(file_system) / sizeof(struct fs_ops)); int -nostrategy(void *f, int func, daddr_t dblk, +nostrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { *rsize = size; diff --git a/sys/arch/vax/boot/boot/ctu.c b/sys/arch/vax/boot/boot/ctu.c index a10824dcf85..70654e2e905 100644 --- a/sys/arch/vax/boot/boot/ctu.c +++ b/sys/arch/vax/boot/boot/ctu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ctu.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */ +/* $OpenBSD: ctu.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: ctu.c,v 1.3 2000/05/20 13:30:03 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -80,7 +80,7 @@ ctuopen(struct open_file *f, int adapt, int ctlr, int unit, int part) } int -ctustrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +ctustrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct rsp *rsp = (struct rsp *)tu_sc.sc_rsp; diff --git a/sys/arch/vax/boot/boot/hp.c b/sys/arch/vax/boot/boot/hp.c index a45e4ae3687..c7f084a6f99 100644 --- a/sys/arch/vax/boot/boot/hp.c +++ b/sys/arch/vax/boot/boot/hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hp.c,v 1.2 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: hp.c,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: hp.c,v 1.5 2000/07/19 00:58:25 matt Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -111,7 +111,7 @@ hpopen(struct open_file *f, int adapt, int ctlr, int unit, int part) } int -hpstrategy(void *f, int func, daddr_t dblk, +hpstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { unsigned int pfnum, mapnr, nsize, bn, cn, sn, tn; diff --git a/sys/arch/vax/boot/boot/mfm.c b/sys/arch/vax/boot/boot/mfm.c index b2af22aa847..5a3eb017a1f 100644 --- a/sys/arch/vax/boot/boot/mfm.c +++ b/sys/arch/vax/boot/boot/mfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfm.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */ +/* $OpenBSD: mfm.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: mfm.c,v 1.4 2001/07/26 22:55:13 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -91,8 +91,8 @@ static int mfm_rxprepare(void); static int mfm_command(int cmd); static int mfm_rxselect(int unit); static int mfm_rdselect(int unit); -static int mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize); -static int mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize); +static int mfm_rxstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize); +static int mfm_rdstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize); /* * we have to wait 0.7 usec between two accesses to any of the * dkc-registers, on a VS2000 with 1 MIPS, this is roughly one @@ -452,7 +452,7 @@ mfmopen(struct open_file *f, int adapt, int ctlr, int unit, int part) } int -mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +mfm_rxstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct mfm_softc *msc = f; struct disklabel *lp; @@ -538,7 +538,7 @@ mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t * } int -mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +mfm_rdstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct mfm_softc *msc = f; struct disklabel *lp; @@ -630,7 +630,7 @@ mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t * } int -mfmstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +mfmstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct mfm_softc *msc = f; int res = -1; diff --git a/sys/arch/vax/boot/boot/ra.c b/sys/arch/vax/boot/boot/ra.c index 0bb3f748b21..c7242cf4f07 100644 --- a/sys/arch/vax/boot/boot/ra.c +++ b/sys/arch/vax/boot/boot/ra.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ra.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: ra.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: ra.c,v 1.11 2002/06/04 15:13:55 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. @@ -258,7 +258,7 @@ igen: uda.uda_cmd.mscp_opcode = cmd; } int -rastrategy(void *f, int func, daddr_t dblk, +rastrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { u_int pfnum, mapnr, nsize; diff --git a/sys/arch/vax/boot/boot/rom.c b/sys/arch/vax/boot/boot/rom.c index f6fb3a7b271..31ebeb7b314 100644 --- a/sys/arch/vax/boot/boot/rom.c +++ b/sys/arch/vax/boot/boot/rom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rom.c,v 1.4 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: rom.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: rom.c,v 1.3 2000/07/19 00:58:25 matt Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -93,7 +93,7 @@ int romstrategy (f, func, dblk, size, buf, rsize) void *f; int func; - daddr_t dblk; + daddr32_t dblk; size_t size; void *buf; size_t *rsize; diff --git a/sys/arch/vax/boot/boot/tmscp.c b/sys/arch/vax/boot/boot/tmscp.c index ff466c8c15b..4c72cad1711 100644 --- a/sys/arch/vax/boot/boot/tmscp.c +++ b/sys/arch/vax/boot/boot/tmscp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmscp.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: tmscp.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: tmscp.c,v 1.3 1999/06/30 18:19:26 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. @@ -160,7 +160,7 @@ command(cmd, arg) tmscpstrategy(ra, func, dblk, size, buf, rsize) struct ra_softc *ra; int func; - daddr_t dblk; + daddr32_t dblk; char *buf; u_int size, *rsize; { diff --git a/sys/arch/vax/boot/boot/vaxstand.h b/sys/arch/vax/boot/boot/vaxstand.h index 8d48a376189..867d7ba9ebf 100644 --- a/sys/arch/vax/boot/boot/vaxstand.h +++ b/sys/arch/vax/boot/boot/vaxstand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vaxstand.h,v 1.1 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: vaxstand.h,v 1.2 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: vaxstand.h,v 1.5 2000/06/15 19:53:23 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -38,7 +38,7 @@ extern int csrbase, nexaddr; /* devsw type definitions, used in bootxx and conf */ #define SADEV(name,strategy,open,close,ioctl) \ { (char *)name, \ - (int(*)(void *, int ,daddr_t , size_t, void *, size_t *))strategy, \ + (int(*)(void *, int, daddr32_t, size_t, void *, size_t *))strategy, \ (int(*)(struct open_file *, ...))open, \ (int(*)(struct open_file *))close, \ (int(*)(struct open_file *,u_long, void *))ioctl} @@ -58,19 +58,19 @@ int net_devinit(struct open_file *f, struct netif_driver *drv, u_char *eaddr); /* device calls */ int raopen(struct open_file *, int, int, int, int), - rastrategy(void *, int, daddr_t, size_t, void *, size_t *); + rastrategy(void *, int, daddr32_t, size_t, void *, size_t *); int hpopen(struct open_file *, int, int, int, int), - hpstrategy(void *, int, daddr_t, size_t, void *, size_t *); + hpstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int ctuopen(struct open_file *, int, int, int, int), - ctustrategy(void *, int, daddr_t, size_t, void *, size_t *); + ctustrategy(void *, int, daddr32_t, size_t, void *, size_t *); int tmscpopen(struct open_file *, int, int, int, int), - tmscpstrategy(void *, int, daddr_t, size_t, void *, size_t *); + tmscpstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int romopen(struct open_file *, int, int, int, int), - romstrategy(void *, int, daddr_t, size_t, void *, size_t *); + romstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int mfmopen(struct open_file *, int, int, int, int), - mfmstrategy(void *, int, daddr_t, size_t, void *, size_t *); + mfmstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int sdopen(struct open_file *), - sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); + sdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int leopen(struct open_file *, int, int, int, int), leclose(struct open_file *); int qeopen(struct open_file *, int, int, int, int), diff --git a/sys/arch/vax/boot/common/vaxstand.h b/sys/arch/vax/boot/common/vaxstand.h index 86cdb8bffdc..b11d898b0b3 100644 --- a/sys/arch/vax/boot/common/vaxstand.h +++ b/sys/arch/vax/boot/common/vaxstand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vaxstand.h,v 1.1 2000/04/27 02:26:26 bjc Exp $ */ +/* $OpenBSD: vaxstand.h,v 1.2 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: vaxstand.h,v 1.1 1999/03/06 16:36:05 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -46,7 +46,7 @@ extern dev_t bootdev; /* devsw type definitions, used in bootxx and conf */ #define SADEV(name,strategy,open,close,ioctl) \ { (char *)name, \ - (int(*)(void *, int ,daddr_t , size_t, void *, size_t *))strategy, \ + (int(*)(void *, int, daddr32_t, size_t, void *, size_t *))strategy, \ (int(*)(struct open_file *, ...))open, \ (int(*)(struct open_file *))close, \ (int(*)(struct open_file *,u_long, void *))ioctl} diff --git a/sys/arch/vax/boot/xxboot/bootxx.c b/sys/arch/vax/boot/xxboot/bootxx.c index 5bcf131282b..debf2c0ee4f 100644 --- a/sys/arch/vax/boot/xxboot/bootxx.c +++ b/sys/arch/vax/boot/xxboot/bootxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootxx.c,v 1.10 2003/08/15 23:16:30 deraadt Exp $ */ +/* $OpenBSD: bootxx.c,v 1.11 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: bootxx.c,v 1.16 2002/03/29 05:45:08 matt Exp $ */ /*- @@ -208,7 +208,7 @@ struct rom_softc { int unit; } rom_softc; -int romstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int romstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int romopen(struct open_file *, int, int, int, int); struct devsw devsw[] = { SADEV("rom", romstrategy, romopen, nullsys, noioctl), @@ -273,7 +273,7 @@ int romstrategy(sc, func, dblk, size, buf, rsize) void *sc; int func; - daddr_t dblk; + daddr32_t dblk; size_t size; void *buf; size_t *rsize; diff --git a/sys/arch/vax/stand/boot/conf.c b/sys/arch/vax/stand/boot/conf.c index 544d19ae36c..ec6a3777ddb 100644 --- a/sys/arch/vax/stand/boot/conf.c +++ b/sys/arch/vax/stand/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.4 2008/08/18 23:20:44 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: conf.c,v 1.10 2000/06/15 19:53:23 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -47,7 +47,7 @@ #include "vaxstand.h" -static int nostrategy(void *, int, daddr_t, size_t, void *, size_t *); +static int nostrategy(void *, int, daddr32_t, size_t, void *, size_t *); struct devsw devsw[]={ SADEV("hp",hpstrategy, hpopen, nullsys, noioctl), @@ -99,7 +99,7 @@ struct fs_ops file_system[] = { int nfsys = (sizeof(file_system) / sizeof(struct fs_ops)); int -nostrategy(void *f, int func, daddr_t dblk, +nostrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { *rsize = size; diff --git a/sys/arch/vax/stand/boot/ctu.c b/sys/arch/vax/stand/boot/ctu.c index a10824dcf85..70654e2e905 100644 --- a/sys/arch/vax/stand/boot/ctu.c +++ b/sys/arch/vax/stand/boot/ctu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ctu.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */ +/* $OpenBSD: ctu.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: ctu.c,v 1.3 2000/05/20 13:30:03 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -80,7 +80,7 @@ ctuopen(struct open_file *f, int adapt, int ctlr, int unit, int part) } int -ctustrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +ctustrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct rsp *rsp = (struct rsp *)tu_sc.sc_rsp; diff --git a/sys/arch/vax/stand/boot/hp.c b/sys/arch/vax/stand/boot/hp.c index a45e4ae3687..c7f084a6f99 100644 --- a/sys/arch/vax/stand/boot/hp.c +++ b/sys/arch/vax/stand/boot/hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hp.c,v 1.2 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: hp.c,v 1.3 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: hp.c,v 1.5 2000/07/19 00:58:25 matt Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -111,7 +111,7 @@ hpopen(struct open_file *f, int adapt, int ctlr, int unit, int part) } int -hpstrategy(void *f, int func, daddr_t dblk, +hpstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { unsigned int pfnum, mapnr, nsize, bn, cn, sn, tn; diff --git a/sys/arch/vax/stand/boot/mfm.c b/sys/arch/vax/stand/boot/mfm.c index b2af22aa847..5a3eb017a1f 100644 --- a/sys/arch/vax/stand/boot/mfm.c +++ b/sys/arch/vax/stand/boot/mfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfm.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */ +/* $OpenBSD: mfm.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: mfm.c,v 1.4 2001/07/26 22:55:13 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -91,8 +91,8 @@ static int mfm_rxprepare(void); static int mfm_command(int cmd); static int mfm_rxselect(int unit); static int mfm_rdselect(int unit); -static int mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize); -static int mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize); +static int mfm_rxstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize); +static int mfm_rdstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize); /* * we have to wait 0.7 usec between two accesses to any of the * dkc-registers, on a VS2000 with 1 MIPS, this is roughly one @@ -452,7 +452,7 @@ mfmopen(struct open_file *f, int adapt, int ctlr, int unit, int part) } int -mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +mfm_rxstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct mfm_softc *msc = f; struct disklabel *lp; @@ -538,7 +538,7 @@ mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t * } int -mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +mfm_rdstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct mfm_softc *msc = f; struct disklabel *lp; @@ -630,7 +630,7 @@ mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t * } int -mfmstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) +mfmstrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { struct mfm_softc *msc = f; int res = -1; diff --git a/sys/arch/vax/stand/boot/ra.c b/sys/arch/vax/stand/boot/ra.c index 0bb3f748b21..c7242cf4f07 100644 --- a/sys/arch/vax/stand/boot/ra.c +++ b/sys/arch/vax/stand/boot/ra.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ra.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: ra.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: ra.c,v 1.11 2002/06/04 15:13:55 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. @@ -258,7 +258,7 @@ igen: uda.uda_cmd.mscp_opcode = cmd; } int -rastrategy(void *f, int func, daddr_t dblk, +rastrategy(void *f, int func, daddr32_t dblk, size_t size, void *buf, size_t *rsize) { u_int pfnum, mapnr, nsize; diff --git a/sys/arch/vax/stand/boot/rom.c b/sys/arch/vax/stand/boot/rom.c index f6fb3a7b271..31ebeb7b314 100644 --- a/sys/arch/vax/stand/boot/rom.c +++ b/sys/arch/vax/stand/boot/rom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rom.c,v 1.4 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: rom.c,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: rom.c,v 1.3 2000/07/19 00:58:25 matt Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -93,7 +93,7 @@ int romstrategy (f, func, dblk, size, buf, rsize) void *f; int func; - daddr_t dblk; + daddr32_t dblk; size_t size; void *buf; size_t *rsize; diff --git a/sys/arch/vax/stand/boot/tmscp.c b/sys/arch/vax/stand/boot/tmscp.c index ff466c8c15b..4c72cad1711 100644 --- a/sys/arch/vax/stand/boot/tmscp.c +++ b/sys/arch/vax/stand/boot/tmscp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmscp.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: tmscp.c,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: tmscp.c,v 1.3 1999/06/30 18:19:26 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. @@ -160,7 +160,7 @@ command(cmd, arg) tmscpstrategy(ra, func, dblk, size, buf, rsize) struct ra_softc *ra; int func; - daddr_t dblk; + daddr32_t dblk; char *buf; u_int size, *rsize; { diff --git a/sys/arch/vax/stand/boot/vaxstand.h b/sys/arch/vax/stand/boot/vaxstand.h index 8d48a376189..867d7ba9ebf 100644 --- a/sys/arch/vax/stand/boot/vaxstand.h +++ b/sys/arch/vax/stand/boot/vaxstand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vaxstand.h,v 1.1 2002/06/11 09:36:23 hugh Exp $ */ +/* $OpenBSD: vaxstand.h,v 1.2 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: vaxstand.h,v 1.5 2000/06/15 19:53:23 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -38,7 +38,7 @@ extern int csrbase, nexaddr; /* devsw type definitions, used in bootxx and conf */ #define SADEV(name,strategy,open,close,ioctl) \ { (char *)name, \ - (int(*)(void *, int ,daddr_t , size_t, void *, size_t *))strategy, \ + (int(*)(void *, int, daddr32_t, size_t, void *, size_t *))strategy, \ (int(*)(struct open_file *, ...))open, \ (int(*)(struct open_file *))close, \ (int(*)(struct open_file *,u_long, void *))ioctl} @@ -58,19 +58,19 @@ int net_devinit(struct open_file *f, struct netif_driver *drv, u_char *eaddr); /* device calls */ int raopen(struct open_file *, int, int, int, int), - rastrategy(void *, int, daddr_t, size_t, void *, size_t *); + rastrategy(void *, int, daddr32_t, size_t, void *, size_t *); int hpopen(struct open_file *, int, int, int, int), - hpstrategy(void *, int, daddr_t, size_t, void *, size_t *); + hpstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int ctuopen(struct open_file *, int, int, int, int), - ctustrategy(void *, int, daddr_t, size_t, void *, size_t *); + ctustrategy(void *, int, daddr32_t, size_t, void *, size_t *); int tmscpopen(struct open_file *, int, int, int, int), - tmscpstrategy(void *, int, daddr_t, size_t, void *, size_t *); + tmscpstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int romopen(struct open_file *, int, int, int, int), - romstrategy(void *, int, daddr_t, size_t, void *, size_t *); + romstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int mfmopen(struct open_file *, int, int, int, int), - mfmstrategy(void *, int, daddr_t, size_t, void *, size_t *); + mfmstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int sdopen(struct open_file *), - sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); + sdstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int leopen(struct open_file *, int, int, int, int), leclose(struct open_file *); int qeopen(struct open_file *, int, int, int, int), diff --git a/sys/arch/vax/stand/common/vaxstand.h b/sys/arch/vax/stand/common/vaxstand.h index 86cdb8bffdc..b11d898b0b3 100644 --- a/sys/arch/vax/stand/common/vaxstand.h +++ b/sys/arch/vax/stand/common/vaxstand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vaxstand.h,v 1.1 2000/04/27 02:26:26 bjc Exp $ */ +/* $OpenBSD: vaxstand.h,v 1.2 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: vaxstand.h,v 1.1 1999/03/06 16:36:05 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -46,7 +46,7 @@ extern dev_t bootdev; /* devsw type definitions, used in bootxx and conf */ #define SADEV(name,strategy,open,close,ioctl) \ { (char *)name, \ - (int(*)(void *, int ,daddr_t , size_t, void *, size_t *))strategy, \ + (int(*)(void *, int, daddr32_t, size_t, void *, size_t *))strategy, \ (int(*)(struct open_file *, ...))open, \ (int(*)(struct open_file *))close, \ (int(*)(struct open_file *,u_long, void *))ioctl} diff --git a/sys/arch/vax/stand/xxboot/bootxx.c b/sys/arch/vax/stand/xxboot/bootxx.c index 5bcf131282b..debf2c0ee4f 100644 --- a/sys/arch/vax/stand/xxboot/bootxx.c +++ b/sys/arch/vax/stand/xxboot/bootxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootxx.c,v 1.10 2003/08/15 23:16:30 deraadt Exp $ */ +/* $OpenBSD: bootxx.c,v 1.11 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: bootxx.c,v 1.16 2002/03/29 05:45:08 matt Exp $ */ /*- @@ -208,7 +208,7 @@ struct rom_softc { int unit; } rom_softc; -int romstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int romstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int romopen(struct open_file *, int, int, int, int); struct devsw devsw[] = { SADEV("rom", romstrategy, romopen, nullsys, noioctl), @@ -273,7 +273,7 @@ int romstrategy(sc, func, dblk, size, buf, rsize) void *sc; int func; - daddr_t dblk; + daddr32_t dblk; size_t size; void *buf; size_t *rsize; diff --git a/sys/arch/zaurus/stand/zboot/unixdev.c b/sys/arch/zaurus/stand/zboot/unixdev.c index 8d745feed12..01a78fbf415 100644 --- a/sys/arch/zaurus/stand/zboot/unixdev.c +++ b/sys/arch/zaurus/stand/zboot/unixdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unixdev.c,v 1.6 2007/06/16 00:26:33 deraadt Exp $ */ +/* $OpenBSD: unixdev.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1996-1998 Michael Shalayeff @@ -41,7 +41,7 @@ #include <lib/libsa/unixdev.h> int -unixstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf, +unixstrategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf, size_t *rsize) { int rc = 0; diff --git a/sys/arch/zaurus/stand/zboot/unixdev.h b/sys/arch/zaurus/stand/zboot/unixdev.h index 50734544d5d..59935b8a746 100644 --- a/sys/arch/zaurus/stand/zboot/unixdev.h +++ b/sys/arch/zaurus/stand/zboot/unixdev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unixdev.h,v 1.1 2005/05/24 20:38:20 uwe Exp $ */ +/* $OpenBSD: unixdev.h,v 1.2 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -28,7 +28,7 @@ */ /* unixdev.c */ -int unixstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int unixstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int unixopen(struct open_file *, ...); int unixclose(struct open_file *); int unixioctl(struct open_file *, u_long, void *); diff --git a/sys/arch/zaurus/stand/zbsdmod/compat_linux.h b/sys/arch/zaurus/stand/zbsdmod/compat_linux.h index ca6b3c41ee9..6aa373aa748 100644 --- a/sys/arch/zaurus/stand/zbsdmod/compat_linux.h +++ b/sys/arch/zaurus/stand/zbsdmod/compat_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: compat_linux.h,v 1.7 2010/12/24 14:22:59 grange Exp $ */ +/* $OpenBSD: compat_linux.h,v 1.8 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de> @@ -57,8 +57,11 @@ struct file; struct inode; typedef long loff_t; -typedef long ssize_t; -typedef unsigned long size_t; + +/* BSD headers */ +#include <sys/types.h> +#include <sys/exec_elf.h> +#include <errno.h> struct file_operations { struct module *owner; @@ -94,11 +97,6 @@ extern void printk(const char *, ...) __attribute__((__format__(printf, 1, 2))); extern void *memcpy(void *, const void *, size_t); -/* BSD headers */ -#include <sys/types.h> -#include <sys/exec_elf.h> -#include <errno.h> - /* Linux LKM support */ static const char __module_kernel_version[] __attribute__((section(".modinfo"))) = "kernel_version=" UTS_RELEASE; diff --git a/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c b/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c index 48e7c55b47c..91281d03880 100644 --- a/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c +++ b/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zbsdmod.c,v 1.8 2010/12/24 14:16:58 grange Exp $ */ +/* $OpenBSD: zbsdmod.c,v 1.9 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de> @@ -338,7 +338,7 @@ zbsdmod_close(struct inode *ino, struct file *f) if (isopen) { if (position > 0) { - printk("%s: loaded %d bytes\n", ZBOOTDEV_NAME, + printk("%s: loaded %ld bytes\n", ZBOOTDEV_NAME, position); if (position < BOOTARGS_BUFSIZ) { diff --git a/sys/lib/libsa/cd9660.c b/sys/lib/libsa/cd9660.c index 45dee369d19..f10cb49352b 100644 --- a/sys/lib/libsa/cd9660.c +++ b/sys/lib/libsa/cd9660.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660.c,v 1.12 2004/07/09 19:20:17 drahn Exp $ */ +/* $OpenBSD: cd9660.c,v 1.13 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: cd9660.c,v 1.1 1996/09/30 16:01:19 ws Exp $ */ /* @@ -58,7 +58,7 @@ struct ucred; struct file { off_t off; /* Current offset within file */ - daddr_t bno; /* Starting block number */ + daddr32_t bno; /* Starting block number */ off_t size; /* Size of file */ }; @@ -134,7 +134,7 @@ cd9660_open(char *path, struct open_file *f) void *buf; struct iso_primary_descriptor *vd; size_t buf_size, nread, psize, dsize; - daddr_t bno; + daddr32_t bno; int parent, ent; struct ptable_ent *pp; struct iso_directory_record *dp; @@ -293,7 +293,7 @@ cd9660_read(struct open_file *f, void *start, size_t size, size_t *resid) { struct file *fp = (struct file *)f->f_fsdata; int rc = 0; - daddr_t bno; + daddr32_t bno; char buf[ISO_DEFAULT_BLOCK_SIZE]; char *dp; size_t nread, off; diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h index 4195b9ca0a9..c9927eff6eb 100644 --- a/sys/lib/libsa/stand.h +++ b/sys/lib/libsa/stand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stand.h,v 1.50 2010/12/06 22:51:46 jasper Exp $ */ +/* $OpenBSD: stand.h,v 1.51 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */ /*- @@ -82,7 +82,7 @@ extern int nfsys; struct devsw { char *dv_name; int (*dv_strategy)(void *devdata, int rw, - daddr_t blk, size_t size, + daddr32_t blk, size_t size, void *buf, size_t *rsize); int (*dv_open)(struct open_file *f, ...); int (*dv_close)(struct open_file *f); diff --git a/sys/lib/libsa/ufs.c b/sys/lib/libsa/ufs.c index 4579dbb161c..b5f3eafaf70 100644 --- a/sys/lib/libsa/ufs.c +++ b/sys/lib/libsa/ufs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs.c,v 1.19 2008/01/06 11:17:18 otto Exp $ */ +/* $OpenBSD: ufs.c,v 1.20 2011/03/13 00:13:53 deraadt Exp $ */ /* $NetBSD: ufs.c,v 1.16 1996/09/30 16:01:22 ws Exp $ */ /*- @@ -88,14 +88,14 @@ struct file { level i */ size_t f_blksize[NIADDR]; /* size of buffer */ - daddr_t f_blkno[NIADDR];/* disk address of block in buffer */ + daddr32_t f_blkno[NIADDR];/* disk address of block in buffer */ char *f_buf; /* buffer for data block */ size_t f_buf_size; /* size of data block */ - daddr_t f_buf_blkno; /* block number of data block */ + daddr32_t f_buf_blkno; /* block number of data block */ }; 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 buf_read_file(struct open_file *, char **, size_t *); static int search_directory(char *, struct open_file *, ino_t *); #ifdef COMPAT_UFS @@ -120,7 +120,7 @@ read_inode(ino_t inumber, struct open_file *f) buf = alloc(fs->fs_bsize); twiddle(); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - fsbtodb(fs, (daddr_t)ino_to_fsba(fs, inumber)), fs->fs_bsize, + fsbtodb(fs, (daddr32_t)ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize); if (rc) goto out; @@ -157,10 +157,10 @@ out: * contains that block. */ static int -block_map(struct open_file *f, daddr_t file_block, daddr_t *disk_block_p) +block_map(struct open_file *f, daddr32_t file_block, daddr32_t *disk_block_p) { struct file *fp = (struct file *)f->f_fsdata; - daddr_t ind_block_num, *ind_p; + daddr32_t ind_block_num, *ind_p; struct fs *fs = fp->f_fs; int level, idx, rc; @@ -234,7 +234,7 @@ block_map(struct open_file *f, daddr_t file_block, daddr_t *disk_block_p) fp->f_blkno[level] = ind_block_num; } - ind_p = (daddr_t *)fp->f_blk[level]; + ind_p = (daddr32_t *)fp->f_blk[level]; if (level > 0) { idx = file_block / fp->f_nindir[level - 1]; @@ -258,7 +258,7 @@ buf_read_file(struct open_file *f, char **buf_p, size_t *size_p) { struct file *fp = (struct file *)f->f_fsdata; struct fs *fs = fp->f_fs; - daddr_t file_block, disk_block; + daddr32_t file_block, disk_block; size_t block_size; long off; int rc; @@ -485,12 +485,12 @@ ufs_open(char *path, struct open_file *f) * Read file for symbolic link */ size_t buf_size; - daddr_t disk_block; + daddr32_t disk_block; struct fs *fs = fp->f_fs; if (!buf) buf = alloc(fs->fs_bsize); - rc = block_map(f, (daddr_t)0, &disk_block); + rc = block_map(f, (daddr32_t)0, &disk_block); if (rc) goto out; diff --git a/sys/lib/libsa/unixdev.c b/sys/lib/libsa/unixdev.c index bdfd06d9ca6..6dc6a828dd6 100644 --- a/sys/lib/libsa/unixdev.c +++ b/sys/lib/libsa/unixdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unixdev.c,v 1.8 2008/01/23 16:37:56 jsing Exp $ */ +/* $OpenBSD: unixdev.c,v 1.9 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1996-1998 Michael Shalayeff @@ -39,7 +39,7 @@ #include <lib/libsa/unixdev.h> int -unixstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf, +unixstrategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf, size_t *rsize) { int rc = 0; diff --git a/sys/lib/libsa/unixdev.h b/sys/lib/libsa/unixdev.h index 9761cdf60b9..c7bc5e56297 100644 --- a/sys/lib/libsa/unixdev.h +++ b/sys/lib/libsa/unixdev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unixdev.h,v 1.6 2003/06/02 20:20:54 mickey Exp $ */ +/* $OpenBSD: unixdev.h,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -29,7 +29,7 @@ /* unixdev.c */ -int unixstrategy(void *, int, daddr_t, size_t, void *, size_t *); +int unixstrategy(void *, int, daddr32_t, size_t, void *, size_t *); int unixopen(struct open_file *, ...); int unixclose(struct open_file *); int unixioctl(struct open_file *, u_long, void *); |