From owner-svn-src-stable-9@freebsd.org Wed May 11 00:37:17 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1848AB36E21; Wed, 11 May 2016 00:37:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E40DE11EA; Wed, 11 May 2016 00:37:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4B0bGEA036949; Wed, 11 May 2016 00:37:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4B0bFfE036944; Wed, 11 May 2016 00:37:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605110037.u4B0bFfE036944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 11 May 2016 00:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299398 - in stable/9/sys/geom: . mirror raid virstor X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 00:37:17 -0000 Author: pfg Date: Wed May 11 00:37:15 2016 New Revision: 299398 URL: https://svnweb.freebsd.org/changeset/base/299398 Log: MFC r298698: geom: unsign some types to match their definitions and avoid overflows. In struct:gctl_req, nargs is unsigned. In mirror: g_mirror_syncreqs is unsigned. In raid: in struct:g_raid_volume, v_disks_count is unsigned. In virstor: in struct:g_virstor_softc, n_components is unsigned. Modified: stable/9/sys/geom/geom_ctl.c stable/9/sys/geom/mirror/g_mirror.c stable/9/sys/geom/raid/md_promise.c stable/9/sys/geom/raid/md_sii.c stable/9/sys/geom/virstor/g_virstor.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_ctl.c ============================================================================== --- stable/9/sys/geom/geom_ctl.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/geom_ctl.c Wed May 11 00:37:15 2016 (r299398) @@ -135,7 +135,7 @@ gctl_copyin(struct gctl_req *req) { struct gctl_req_arg *ap; char *p; - int i; + u_int i; ap = geom_alloc_copyin(req, req->arg, req->narg * sizeof(*ap)); if (ap == NULL) { @@ -212,7 +212,7 @@ gctl_copyout(struct gctl_req *req) static void gctl_free(struct gctl_req *req) { - int i; + u_int i; sbuf_delete(req->serror); if (req->arg == NULL) @@ -270,7 +270,7 @@ int gctl_set_param(struct gctl_req *req, const char *param, void const *ptr, int len) { - int i; + u_int i; struct gctl_req_arg *ap; for (i = 0; i < req->narg; i++) { @@ -311,7 +311,7 @@ gctl_set_param_err(struct gctl_req *req, void * gctl_get_param(struct gctl_req *req, const char *param, int *len) { - int i; + u_int i; void *p; struct gctl_req_arg *ap; @@ -332,7 +332,7 @@ gctl_get_param(struct gctl_req *req, con char const * gctl_get_asciiparam(struct gctl_req *req, const char *param) { - int i; + u_int i; char const *p; struct gctl_req_arg *ap; Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/mirror/g_mirror.c Wed May 11 00:37:15 2016 (r299398) @@ -1119,7 +1119,7 @@ g_mirror_sync_collision(struct g_mirror_ struct g_mirror_disk *disk; struct bio *sbp; off_t rstart, rend, sstart, send; - int i; + u_int i; if (sc->sc_sync.ds_ndisks == 0) return (0); Modified: stable/9/sys/geom/raid/md_promise.c ============================================================================== --- stable/9/sys/geom/raid/md_promise.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/raid/md_promise.c Wed May 11 00:37:15 2016 (r299398) @@ -893,7 +893,7 @@ g_raid_md_promise_start(struct g_raid_vo struct g_raid_md_promise_perdisk *pd; struct g_raid_md_promise_pervolume *pv; struct promise_raid_conf *meta; - int i; + u_int i; sc = vol->v_softc; md = sc->sc_md; Modified: stable/9/sys/geom/raid/md_sii.c ============================================================================== --- stable/9/sys/geom/raid/md_sii.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/raid/md_sii.c Wed May 11 00:37:15 2016 (r299398) @@ -1481,7 +1481,7 @@ g_raid_md_write_sii(struct g_raid_md_obj struct g_raid_md_sii_object *mdi; struct g_raid_md_sii_perdisk *pd; struct sii_raid_conf *meta; - int i; + u_int i; sc = md->mdo_softc; mdi = (struct g_raid_md_sii_object *)md; Modified: stable/9/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/9/sys/geom/virstor/g_virstor.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/virstor/g_virstor.c Wed May 11 00:37:15 2016 (r299398) @@ -475,7 +475,7 @@ static void update_metadata(struct g_virstor_softc *sc) { struct g_virstor_metadata md; - int n; + u_int n; if (virstor_valid_components(sc) != sc->n_components) return; /* Incomplete device */ @@ -932,7 +932,7 @@ virstor_geom_destroy(struct g_virstor_so { struct g_provider *pp; struct g_geom *gp; - int n; + u_int n; g_topology_assert();