From 62f7c8fbc1dec5808ae51dc002a35d9a60ddb6d9 Mon Sep 17 00:00:00 2001 From: dlg Date: Sun, 14 Aug 2016 04:08:03 +0000 Subject: [PATCH] change some types in bio from u_quad_t to uint64_t, and fix casts in drivers that fill that field in too. quad types are going away. --- sys/dev/biovar.h | 6 +++--- sys/dev/ic/ami.c | 12 ++++++------ sys/dev/ic/ciss.c | 4 ++-- sys/dev/ic/mfireg.h | 2 +- sys/dev/ic/mpi.c | 6 +++--- sys/dev/pci/ips.c | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/dev/biovar.h b/sys/dev/biovar.h index e083c629165..a6eead01276 100644 --- a/sys/dev/biovar.h +++ b/sys/dev/biovar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: biovar.h,v 1.44 2015/05/29 00:33:37 uebayasi Exp $ */ +/* $OpenBSD: biovar.h,v 1.45 2016/08/14 04:08:03 dlg Exp $ */ /* * Copyright (c) 2002 Niklas Hallqvist. All rights reserved. @@ -105,7 +105,7 @@ struct bioc_disk { #define BIOC_SDSCRUB_S "Scrubbing" #define BIOC_SDINVALID 0xff #define BIOC_SDINVALID_S "Invalid" - u_quad_t bd_size; /* size of the disk */ + uint64_t bd_size; /* size of the disk */ char bd_vendor[32]; /* scsi string */ char bd_serial[32]; /* serial number */ @@ -141,7 +141,7 @@ struct bioc_vol { #define BIOC_SVREBUILD_S "Rebuild" #define BIOC_SVINVALID 0xff #define BIOC_SVINVALID_S "Invalid" - u_quad_t bv_size; /* size of the disk */ + uint64_t bv_size; /* size of the disk */ int bv_level; /* raid level */ int bv_nodisk; /* nr of drives */ int bv_cache; /* cache mode */ diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index d9ae5176a42..d544684df25 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.231 2015/09/09 18:23:55 deraadt Exp $ */ +/* $OpenBSD: ami.c,v 1.232 2016/08/14 04:08:03 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -1971,8 +1971,8 @@ ami_vol(struct ami_softc *sc, struct bioc_vol *bv, struct ami_big_diskarray *p) } bv->bv_status = BIOC_SVONLINE; - bv->bv_size = (u_quad_t)p->apd[i].adp_size * - (u_quad_t)512; + bv->bv_size = (uint64_t)p->apd[i].adp_size * + (uint64_t)512; bv->bv_nodisk = 1; strlcpy(bv->bv_dev, sc->sc_hdr[bv->bv_volid].dev, @@ -2176,7 +2176,7 @@ ami_ioctl_vol(struct ami_softc *sc, struct bioc_vol *bv) if (p->ald[i].adl_spandepth > 1) bv->bv_level *= 10; - bv->bv_size *= (u_quad_t)512; + bv->bv_size *= (uint64_t)512; strlcpy(bv->bv_dev, sc->sc_hdr[i].dev, sizeof(bv->bv_dev)); @@ -2223,8 +2223,8 @@ ami_ioctl_disk(struct ami_softc *sc, struct bioc_disk *bd) AMI_MAX_TARGET + p->ald[i].asp[s].adv[t].add_target; - bd->bd_size = (u_quad_t)p->apd[off].adp_size * - (u_quad_t)512; + bd->bd_size = (uint64_t)p->apd[off].adp_size * + (uint64_t)512; switch (p->apd[off].adp_ostatus) { case AMI_PD_UNCNF: diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index 324efc09397..670f4cc0091 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.74 2015/09/09 18:23:55 deraadt Exp $ */ +/* $OpenBSD: ciss.c,v 1.75 2016/08/14 04:08:03 dlg Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -1016,7 +1016,7 @@ ciss_ioctl(struct device *dev, u_long cmd, caddr_t addr) bv->bv_status = BIOC_SVINVALID; blks = (u_int)letoh16(ldid->nblocks[1]) << 16 | letoh16(ldid->nblocks[0]); - bv->bv_size = blks * (u_quad_t)letoh16(ldid->blksize); + bv->bv_size = blks * (uint64_t)letoh16(ldid->blksize); bv->bv_level = ciss_level[ldid->type]; bv->bv_nodisk = ldp->ndrives; strlcpy(bv->bv_dev, ldp->xname, sizeof(bv->bv_dev)); diff --git a/sys/dev/ic/mfireg.h b/sys/dev/ic/mfireg.h index ad046d4d462..3ca2f8d4e8f 100644 --- a/sys/dev/ic/mfireg.h +++ b/sys/dev/ic/mfireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mfireg.h,v 1.44 2016/08/14 01:52:47 dlg Exp $ */ +/* $OpenBSD: mfireg.h,v 1.45 2016/08/14 04:08:03 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom * diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 82df1cb1d0b..3689881f254 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.203 2015/10/23 00:08:57 jsg Exp $ */ +/* $OpenBSD: mpi.c,v 1.204 2016/08/14 04:08:03 dlg Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne @@ -3264,7 +3264,7 @@ mpi_ioctl_vol(struct mpi_softc *sc, struct bioc_vol *bv) if (rpg0->volume_status & MPI_CFG_RAID_VOL_0_STATUS_RESYNCING) bv->bv_status = BIOC_SVREBUILD; - bv->bv_size = (u_quad_t)lemtoh32(&rpg0->max_lba) * 512; + bv->bv_size = (uint64_t)lemtoh32(&rpg0->max_lba) * 512; switch (sc->sc_vol_list[id].vol_type) { case MPI_CFG_RAID_TYPE_RAID_IS: @@ -3356,7 +3356,7 @@ mpi_ioctl_disk(struct mpi_softc *sc, struct bioc_disk *bd) bd->bd_channel = pdpg0.phys_disk_bus; bd->bd_target = pdpg0.phys_disk_id; bd->bd_lun = 0; - bd->bd_size = (u_quad_t)lemtoh32(&pdpg0.max_lba) * 512; + bd->bd_size = (uint64_t)lemtoh32(&pdpg0.max_lba) * 512; strlcpy(bd->bd_vendor, (char *)pdpg0.vendor_id, sizeof(bd->bd_vendor)); switch (pdpg0.phys_disk_state) { diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index 51ef0ecb987..ae494d7333f 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ips.c,v 1.112 2015/09/10 18:10:34 deraadt Exp $ */ +/* $OpenBSD: ips.c,v 1.113 2016/08/14 04:08:03 dlg Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Alexander Yurchenko @@ -1145,7 +1145,7 @@ ips_ioctl_vol(struct ips_softc *sc, struct bioc_vol *bv) } } - bv->bv_size = (u_quad_t)letoh32(ld->size) * IPS_SECSZ; + bv->bv_size = (uint64_t)letoh32(ld->size) * IPS_SECSZ; bv->bv_level = di->drive[vid].raid; bv->bv_nodisk = ld->chunkcnt; @@ -1221,7 +1221,7 @@ out: bd->bd_channel = chan; bd->bd_target = target; bd->bd_lun = 0; - bd->bd_size = (u_quad_t)letoh32(dev->seccnt) * IPS_SECSZ; + bd->bd_size = (uint64_t)letoh32(dev->seccnt) * IPS_SECSZ; bzero(bd->bd_vendor, sizeof(bd->bd_vendor)); memcpy(bd->bd_vendor, dev->devid, MIN(sizeof(bd->bd_vendor), -- 2.20.1