diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/wd.c | 10 | ||||
-rw-r--r-- | sys/dev/ata/wdvar.h | 10 | ||||
-rw-r--r-- | sys/dev/ccd.c | 23 | ||||
-rw-r--r-- | sys/dev/ccdvar.h | 12 | ||||
-rw-r--r-- | sys/dev/flash.c | 8 | ||||
-rw-r--r-- | sys/dev/isa/fd.c | 8 | ||||
-rw-r--r-- | sys/dev/isa/mcd.c | 20 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_openbsdkintf.c | 12 | ||||
-rw-r--r-- | sys/dev/ramdisk.c | 6 | ||||
-rw-r--r-- | sys/dev/softraidvar.h | 10 | ||||
-rw-r--r-- | sys/dev/vnd.c | 12 |
11 files changed, 66 insertions, 65 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index d1aeeccabd2..82722893171 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.61 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: wd.c,v 1.62 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -506,7 +506,7 @@ wdstart(void *arg) void __wdstart(struct wd_softc *wd, struct buf *bp) { - daddr_t nblks; + daddr64_t nblks; wd->sc_wdc_bio.blkno = bp->b_blkno + DL_GETPOFFSET(&wd->sc_dk.dk_label->d_partitions[DISKPART(bp->b_dev)]); @@ -952,12 +952,12 @@ wdformat(struct buf *bp) } #endif -int +daddr64_t wdsize(dev_t dev) { struct wd_softc *wd; int part, omask; - int size; + int64_t size; WDCDEBUG_PRINT(("wdsize\n"), DEBUG_FUNCS); @@ -992,7 +992,7 @@ static int wddumpmulti = 1; * Dump core after a system crash. */ int -wddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +wddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { struct wd_softc *wd; /* disk unit to do the I/O */ struct disklabel *lp; /* disk's disklabel */ diff --git a/sys/dev/ata/wdvar.h b/sys/dev/ata/wdvar.h index 429d49ec4eb..0efca4b845f 100644 --- a/sys/dev/ata/wdvar.h +++ b/sys/dev/ata/wdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdvar.h,v 1.11 2004/09/24 07:05:44 grange Exp $ */ +/* $OpenBSD: wdvar.h,v 1.12 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: wdvar.h,v 1.3 1998/11/11 19:38:27 bouyer Exp $ */ /* @@ -48,9 +48,9 @@ struct ata_bio { #define ATA_LBA48 0x0080 /* transfer uses 48-bit LBA addressing */ int multi; /* number of blocks to transfer in multi-mode */ struct disklabel *lp; /* pointer to drive's label info */ - daddr_t blkno; /* block addr */ - daddr_t blkdone; /* number of blks transferred */ - daddr_t nblks; /* number of block currently transfering */ + daddr64_t blkno; /* block addr */ + daddr64_t blkdone; /* number of blks transferred */ + daddr64_t nblks; /* number of block currently transfering */ int nbytes; /* number of bytes currently transfering */ long bcount; /* total number of bytes */ char *databuf; /* data buffer address */ @@ -62,7 +62,7 @@ struct ata_bio { #define TIMEOUT 4 /* device timed out */ #define ERR_NODEV 5 /* device bas been detached */ u_int8_t r_error; /* copy of error register */ - daddr_t badsect[127]; /* 126 plus trailing -1 marker */ + daddr64_t badsect[127]; /* 126 plus trailing -1 marker */ struct wd_softc *wd; }; diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index 4f6e9b89c13..7a6047b1c2e 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccd.c,v 1.74 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: ccd.c,v 1.75 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */ /*- @@ -173,14 +173,14 @@ void ccdattach(int); /* called by biodone() at interrupt time */ void ccdiodone(struct buf *); -int ccdsize(dev_t); +daddr64_t ccdsize(dev_t); void ccdstart(struct ccd_softc *, struct buf *); void ccdinterleave(struct ccd_softc *); void ccdintr(struct ccd_softc *, struct buf *); int ccdinit(struct ccddevice *, char **, struct proc *); int ccdlookup(char *, struct proc *p, struct vnode **); -long ccdbuffer(struct ccd_softc *, struct buf *, daddr_t, caddr_t, +long ccdbuffer(struct ccd_softc *, struct buf *, daddr64_t, caddr_t, long, struct ccdbuf **); void ccdgetdisklabel(dev_t, struct ccd_softc *, struct disklabel *, struct cpu_disklabel *, int); @@ -268,7 +268,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct proc *p) { struct ccd_softc *cs = &ccd_softc[ccd->ccd_unit]; struct ccdcinfo *ci = NULL; - size_t size; + daddr64_t size; int ix, rpm; struct vnode *vp; struct vattr va; @@ -468,7 +468,7 @@ ccdinterleave(struct ccd_softc *cs) { struct ccdcinfo *ci, *smallci; struct ccdiinfo *ii; - daddr_t bn, lbn; + daddr64_t bn, lbn; int ix; u_long size; @@ -710,7 +710,7 @@ ccdstart(struct ccd_softc *cs, struct buf *bp) long bcount, rcount; struct ccdbuf **cbpp; caddr_t addr; - daddr_t bn; + daddr64_t bn; struct partition *pp; CCD_DPRINTF(CCDB_FOLLOW, ("ccdstart(%p, %p, %s)\n", cs, bp, @@ -764,12 +764,12 @@ ccdstart(struct ccd_softc *cs, struct buf *bp) * Build a component buffer header. */ long -ccdbuffer(struct ccd_softc *cs, struct buf *bp, daddr_t bn, caddr_t addr, +ccdbuffer(struct ccd_softc *cs, struct buf *bp, daddr64_t bn, caddr_t addr, long bcount, struct ccdbuf **cbpp) { struct ccdcinfo *ci, *ci2 = NULL; struct ccdbuf *cbp; - daddr_t cbn, cboff, sblk; + daddr64_t cbn, cboff, sblk; int ccdisk, ccdisk2, off; long cnt; struct ccdiinfo *ii; @@ -1269,11 +1269,12 @@ ccdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) return (0); } -int +daddr64_t ccdsize(dev_t dev) { struct ccd_softc *cs; - int part, size, unit; + int part, unit; + daddr64_t size; unit = DISKUNIT(dev); if (unit >= numccd) @@ -1299,7 +1300,7 @@ ccdsize(dev_t dev) } int -ccddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +ccddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* Not implemented. */ diff --git a/sys/dev/ccdvar.h b/sys/dev/ccdvar.h index 81e44403938..94ae9164ca3 100644 --- a/sys/dev/ccdvar.h +++ b/sys/dev/ccdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ccdvar.h,v 1.10 2007/04/18 19:06:56 miod Exp $ */ +/* $OpenBSD: ccdvar.h,v 1.11 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ccdvar.h,v 1.11 1996/02/28 01:08:32 thorpej Exp $ */ /*- @@ -162,11 +162,11 @@ struct ccdcinfo { * 2 starting at offset 5. */ struct ccdiinfo { - daddr_t ii_startblk; /* starting scaled block # for range */ - daddr_t ii_startoff; /* starting component offset (block #) */ - int *ii_index; /* ordered list of components in range */ - int *ii_parity; /* list of parity shifts */ - int ii_ndisk; /* # of disks range is interleaved over */ + daddr64_t ii_startblk; /* starting scaled block # for range */ + daddr64_t ii_startoff; /* starting component offset (block #) */ + int *ii_index; /* ordered list of components in range */ + int *ii_parity; /* list of parity shifts */ + int ii_ndisk; /* # of disks range is interleaved over */ }; /* diff --git a/sys/dev/flash.c b/sys/dev/flash.c index c96562cb342..bdc1c6650f5 100644 --- a/sys/dev/flash.c +++ b/sys/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.4 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: flash.c,v 1.5 2007/06/06 17:15:13 deraadt Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org> @@ -865,13 +865,13 @@ flashioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) } int -flashdump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +flashdump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { printf("flashdump\n"); return ENODEV; } -int +daddr64_t flashsize(dev_t dev) { printf("flashsize\n"); @@ -900,7 +900,7 @@ void _flashstart(struct flash_softc *sc, struct buf *bp) { int part; - long offset; + daddr64_t offset; long pgno; part = flashpart(bp->b_dev); diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 2c45df9ed71..7144ccae957 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.64 2007/06/05 00:38:21 deraadt Exp $ */ +/* $OpenBSD: fd.c,v 1.65 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -102,7 +102,7 @@ struct fd_softc { struct fd_type *sc_deftype; /* default type descriptor */ struct fd_type *sc_type; /* current type descriptor */ - daddr_t sc_blkno; /* starting block number */ + daddr64_t sc_blkno; /* starting block number */ int sc_bcount; /* byte count left */ int sc_opts; /* user-set options */ int sc_skip; /* bytes already transferred */ @@ -580,7 +580,7 @@ fdclose(dev, flags, mode, p) return 0; } -int +daddr64_t fdsize(dev) dev_t dev; { @@ -592,7 +592,7 @@ fdsize(dev) int fddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 07a51bc3fd9..805463f16e9 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.45 2007/06/05 00:38:21 deraadt Exp $ */ +/* $OpenBSD: mcd.c,v 1.46 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -94,7 +94,7 @@ struct mcd_mbx { int retry, count; struct buf *bp; - daddr_t blkno; + daddr64_t blkno; int nblk; int sz; u_long skip; @@ -177,7 +177,7 @@ u_int8_t const __bin2bcd[] = { #define bin2bcd(b) (__bin2bcd[(b)&0xff]) static void hsg2msf(int, bcd_t *); -static daddr_t msf2hsg(bcd_t *, int); +static daddr64_t msf2hsg(bcd_t *, int); int mcd_playtracks(struct mcd_softc *, struct ioc_play_track *); int mcd_playmsf(struct mcd_softc *, struct ioc_play_msf *); @@ -778,7 +778,7 @@ mcd_get_parms(sc) struct mcd_softc *sc; { struct mcd_mbox mbx; - daddr_t size; + daddr64_t size; int error; /* Send volume info command. */ @@ -800,7 +800,7 @@ mcd_get_parms(sc) return 0; } -int +daddr64_t mcdsize(dev) dev_t dev; { @@ -812,7 +812,7 @@ mcdsize(dev) int mcddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { @@ -1101,12 +1101,12 @@ hsg2msf(hsg, msf) M_msf(msf) = bin2bcd(hsg); } -static daddr_t +static daddr64_t msf2hsg(msf, relative) bcd_t *msf; int relative; { - daddr_t blkno; + daddr64_t blkno; blkno = bcd2bin(M_msf(msf)) * 75 * 60 + bcd2bin(S_msf(msf)) * 75 + @@ -1454,7 +1454,7 @@ mcd_toc_entries(sc, te) struct cd_toc_entry entries[MCD_MAXTOCS]; } data; u_char trk; - daddr_t lba; + daddr64_t lba; int error, n; if (len > sizeof(data.entries) || @@ -1574,7 +1574,7 @@ mcd_read_subchannel(sc, ch) int len = ch->data_len; union mcd_qchninfo q; struct cd_sub_channel_info data; - daddr_t lba; + daddr64_t lba; int error; if (sc->debug) diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index 7b2b4f2336d..5fddda32e4d 100644 --- a/sys/dev/raidframe/rf_openbsdkintf.c +++ b/sys/dev/raidframe/rf_openbsdkintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_openbsdkintf.c,v 1.36 2007/06/05 00:38:22 deraadt Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.37 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- @@ -181,7 +181,7 @@ int raidioctl(dev_t, u_long, caddr_t, int, struct proc *); int raidwrite(dev_t, struct uio *, int); int raidread(dev_t, struct uio *, int); void raidstrategy(struct buf *); -int raiddump(dev_t, daddr_t, caddr_t, size_t); +int raiddump(dev_t, daddr64_t, caddr_t, size_t); /* * Pilfered from ccd.c @@ -611,7 +611,7 @@ raidsize(dev_t dev) } int -raiddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +raiddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* Not implemented. */ return (ENXIO); @@ -1719,7 +1719,7 @@ raidstart(RF_Raid_t *raidPtr) RF_RaidAddr_t raid_addr; int retcode; struct partition *pp; - daddr_t blocknum; + daddr64_t blocknum; int unit; struct raid_softc *rs; int do_async; @@ -1761,8 +1761,8 @@ raidstart(RF_Raid_t *raidPtr) blocknum += DL_GETPOFFSET(pp); } - db1_printf(("Blocks: %d, %d\n", (int) bp->b_blkno, - (int) blocknum)); + db1_printf(("Blocks: %d, %lld\n", (int) bp->b_blkno, + blocknum)); db1_printf(("bp->b_bcount = %d\n", (int) bp->b_bcount)); db1_printf(("bp->b_resid = %d\n", (int) bp->b_resid)); diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index f5fcc1d70b5..c2f138f3e7a 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.32 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.33 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -211,14 +211,14 @@ dev_type_dump(rddump); int rddump(dev, blkno, va, size) dev_t dev; - daddr_t blkno; + daddr64_t blkno; caddr_t va; size_t size; { return ENODEV; } -int +daddr64_t rdsize(dev_t dev) { int part, unit; diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index 65ce1549449..46be3692a8e 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.30 2007/06/02 00:53:35 marco Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.31 2007/06/06 17:15:13 deraadt Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -196,8 +196,8 @@ struct sr_chunk_meta { u_int32_t scm_status; /* use bio bioc_disk status */ u_int32_t scm_pad1; char scm_devname[32];/* /dev/XXXXX */ - u_quad_t scm_size; /* size of partition */ - u_quad_t scm_coerced_size; /* coerced size of part */ + int64_t scm_size; /* size of partition */ + int64_t scm_coerced_size; /* coerced size of part */ struct sr_uuid scm_uuid; /* unique identifier */ } __packed; @@ -210,7 +210,7 @@ struct sr_chunk { /* helper members before metadata makes it onto the chunk */ int src_meta_ondisk;/* set when meta is on disk */ char src_devname[32]; - quad_t src_size; + int64_t src_size; SLIST_ENTRY(sr_chunk) src_link; }; @@ -224,7 +224,7 @@ struct sr_vol_meta { u_int32_t svm_flags; /* flags */ #define SR_VOL_DIRTY 0x01 u_int32_t svm_level; /* raid level */ - u_quad_t svm_size; /* virtual disk size */ + int64_t svm_size; /* virtual disk size */ char svm_devname[32];/* /dev/XXXXX */ char svm_vendor[8]; /* scsi vendor */ char svm_product[16];/* scsi product */ diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 15777a7df78..eeae63a60cd 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.76 2007/06/05 00:38:20 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.77 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -161,13 +161,13 @@ int vndsetcred(struct vnd_softc *, struct ucred *); void vndiodone(struct buf *); void vndshutdown(void); void vndgetdisklabel(dev_t, struct vnd_softc *); -void vndencrypt(struct vnd_softc *, caddr_t, size_t, daddr_t, int); +void vndencrypt(struct vnd_softc *, caddr_t, size_t, daddr64_t, int); #define vndlock(sc) rw_enter(&sc->sc_rwlock, RW_WRITE|RW_INTR) #define vndunlock(sc) rw_exit_write(&sc->sc_rwlock) void -vndencrypt(struct vnd_softc *vnd, caddr_t addr, size_t size, daddr_t off, +vndencrypt(struct vnd_softc *vnd, caddr_t addr, size_t size, daddr64_t off, int encrypt) { int i, bsize; @@ -437,7 +437,7 @@ vndstrategy(struct buf *bp) /* Loop until all queued requests are handled. */ for (;;) { int part = DISKPART(bp->b_dev); - int off = DL_GETPOFFSET(&vnd->sc_dk.dk_label->d_partitions[part]); + daddr64_t off = DL_GETPOFFSET(&vnd->sc_dk.dk_label->d_partitions[part]); aiov.iov_base = bp->b_data; auio.uio_resid = aiov.iov_len = bp->b_bcount; @@ -997,7 +997,7 @@ vndclear(struct vnd_softc *vnd) vnd->sc_size = 0; } -int +daddr64_t vndsize(dev_t dev) { int unit = vndunit(dev); @@ -1009,7 +1009,7 @@ vndsize(dev_t dev) } int -vnddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +vnddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { /* Not implemented. */ |