From owner-svn-src-all@FreeBSD.ORG Thu Jan 13 18:35:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B6B106564A; Thu, 13 Jan 2011 18:35:09 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDF98FC15; Thu, 13 Jan 2011 18:35:09 +0000 (UTC) Received: by iwn39 with SMTP id 39so1793672iwn.13 for ; Thu, 13 Jan 2011 10:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=vPxRyCEqaoPWjGUZsLFrEiyVjHrnx9qqsYZ3Ji0KauY=; b=yDY+PyQ1LXAqaK6p/nEzB2gvho2F8X5YPumSROOY2kHcncKDxrkIEGJ4f4E+t9r3LR MMAZ5+LmDXi5Wy5BUVNKLH/YYCOL6+FHUjtORh7EPYAq4noWNc3PlPQx5qpUIps+bCCz P9U1K3zAc+OoUw3AAhobvoCIK8CnMiMknHKHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=TZdqUcOfN0n0VAsBzDwHTOg3HvE9JIc4DCyr2LKharM/gXtp1PyfE5JfoQn80i4Fjj CqOiGDPlF+6dLEzm0m8B04KRkbj1R6hDx9LEgR+xh8LXe6ijGo6GDxZFNPz6EUCzbGnh +PxXNuFNiSAmiSezbrTA700LnMN2W3skdjZ+k= MIME-Version: 1.0 Received: by 10.231.40.3 with SMTP id i3mr2746058ibe.129.1294943708681; Thu, 13 Jan 2011 10:35:08 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.231.160.147 with HTTP; Thu, 13 Jan 2011 10:35:08 -0800 (PST) In-Reply-To: <201101131820.p0DIKXip059402@svn.freebsd.org> References: <201101131820.p0DIKXip059402@svn.freebsd.org> Date: Thu, 13 Jan 2011 10:35:08 -0800 X-Google-Sender-Auth: kOindGSYKr8grblkSDimLxD2pu0 Message-ID: From: mdf@FreeBSD.org To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r217369 - in head/sys: cam/scsi sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 18:35:09 -0000 There appear to be 330 uses of SYSCTL and QUAD on the same line in CURRENT. This seems reasonable to change them to S64, U64 and X64 so they correctly reflect the size they operate upon. What do y'all think? Thanks, matthew On Thu, Jan 13, 2011 at 10:20 AM, Matthew D Fleming wrote= : > Author: mdf > Date: Thu Jan 13 18:20:33 2011 > New Revision: 217369 > URL: http://svn.freebsd.org/changeset/base/217369 > > Log: > =A0Add a 64-bit hex-printed sysctl(9) since there is at least one place i= n > =A0the code that wanted it. =A0It is named X64 rather than XQUAD since th= e > =A0quad name is a historical abomination that should not be perpetuated. > > Modified: > =A0head/sys/cam/scsi/scsi_da.c > =A0head/sys/sys/sysctl.h > > Modified: head/sys/cam/scsi/scsi_da.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:27 2011 =A0 =A0 =A0 =A0(= r217368) > +++ head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:33 2011 =A0 =A0 =A0 =A0(= r217369) > @@ -1127,9 +1127,9 @@ dasysctlinit(void *context, int pending) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ccb_trans_settings_fc *fc =3D &cts.= xport_specific.fc; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (fc->valid & CTS_FC_VALID_WWPN) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0softc->wwpn =3D fc->wwpn; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SYSCTL_ADD_XLONG(&softc->sy= sctl_ctx, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SYSCTL_ADD_X64(&softc->sysc= tl_ctx, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0SYSCTL_CHILDREN(so= ftc->sysctl_tree), > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 OID_AUTO, "wwpn", C= TLTYPE_QUAD | CTLFLAG_RD, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 OID_AUTO, "wwpn", C= TLFLAG_RD, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&softc->wwpn, "Wor= ld Wide Port Name"); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0} > > Modified: head/sys/sys/sysctl.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/sysctl.h =A0 =A0 =A0 Thu Jan 13 18:20:27 2011 =A0 =A0 = =A0 =A0(r217368) > +++ head/sys/sys/sysctl.h =A0 =A0 =A0 Thu Jan 13 18:20:33 2011 =A0 =A0 = =A0 =A0(r217369) > @@ -245,6 +245,8 @@ SYSCTL_ALLOWED_TYPES(ULONG, unsigned lon > =A0SYSCTL_ALLOWED_TYPES(XLONG, unsigned long *a; long *b; ); > =A0SYSCTL_ALLOWED_TYPES(INT64, int64_t *a; long long *b; ); > =A0SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; ); > +SYSCTL_ALLOWED_TYPES(XINT64, uint64_t *a; int64_t *b; > + =A0 =A0unsigned long long *c; long long *d; ); > > =A0#ifdef notyet > =A0#define =A0 =A0 =A0 =A0SYSCTL_ADD_ASSERT_TYPE(type, ptr) =A0 =A0 =A0 \ > @@ -389,7 +391,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a > =A0 =A0 =A0 =A0 =A0 =A0SYSCTL_ADD_ASSERT_TYPE(INT64, ptr), 0, =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0 =A0 =A0 =A0 =A0 =A0sysctl_handle_quad, "Q", __DESCR(descr)) > > -/* Oid for a quad. =A0The pointer must be non NULL. */ > =A0#define =A0 =A0 =A0 =A0SYSCTL_UQUAD(parent, nbr, name, access, ptr, va= l, descr) =A0 =A0 =A0 =A0\ > =A0 =A0 =A0 =A0SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0\ > =A0 =A0 =A0 =A0SYSCTL_OID(parent, nbr, name, =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > @@ -402,6 +403,18 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a > =A0 =A0 =A0 =A0 =A0 =A0SYSCTL_ADD_ASSERT_TYPE(UINT64, ptr), 0, =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > =A0 =A0 =A0 =A0 =A0 =A0sysctl_handle_quad, "QU", __DESCR(descr)) > > +#define =A0 =A0 =A0 =A0SYSCTL_X64(parent, nbr, name, access, ptr, val, d= escr) =A0\ > + =A0 =A0 =A0 SYSCTL_ASSERT_TYPE(XINT64, ptr, parent, name); =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0\ > + =A0 =A0 =A0 SYSCTL_OID(parent, nbr, name, =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 =A0 =A0 CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), =A0 \ > + =A0 =A0 =A0 =A0 =A0 ptr, val, sysctl_handle_quad, "QX", descr) > + > +#define =A0 =A0 =A0 =A0SYSCTL_ADD_X64(ctx, parent, nbr, name, access, pt= r, descr) =A0 =A0 =A0\ > + =A0 =A0 =A0 sysctl_add_oid(ctx, parent, nbr, name, =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > + =A0 =A0 =A0 =A0 =A0 CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 =A0 =A0 SYSCTL_ADD_ASSERT_TYPE(XINT64, ptr), 0, =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 =A0 =A0 sysctl_handle_quad, "QX", __DESCR(descr)) > + > =A0/* Oid for an opaque object. =A0Specified by a pointer and a length. *= / > =A0#define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr)= \ > =A0 =A0 =A0 =A0SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \ >