From owner-svn-src-head@FreeBSD.ORG Thu Jun 19 20:05:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4A96E43; Thu, 19 Jun 2014 20:05:31 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7605F25CC; Thu, 19 Jun 2014 20:05:31 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C74C31FE026; Thu, 19 Jun 2014 22:05:24 +0200 (CEST) Message-ID: <53A34293.7090906@selasky.org> Date: Thu, 19 Jun 2014 22:05:39 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Matthew Fleming Subject: Re: svn commit: r267633 - head/sys/sys References: <201406190528.s5J5Sg8m099792@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 20:05:32 -0000 On 06/19/14 16:07, Matthew Fleming wrote: > On Wed, Jun 18, 2014 at 10:28 PM, Hans Petter Selasky > wrote: >> Author: hselasky >> Date: Thu Jun 19 05:28:42 2014 >> New Revision: 267633 >> URL: http://svnweb.freebsd.org/changeset/base/267633 >> >> Log: >> Initialize sysctl OID structure by record. >> >> MFC after: 2 weeks >> >> Modified: >> head/sys/sys/sysctl.h >> >> Modified: head/sys/sys/sysctl.h >> ============================================================================== >> --- head/sys/sys/sysctl.h Thu Jun 19 05:10:03 2014 (r267632) >> +++ head/sys/sys/sysctl.h Thu Jun 19 05:28:42 2014 (r267633) >> @@ -278,19 +278,16 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a >> /* This constructs a "raw" MIB oid. */ >> #define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr)\ >> static struct sysctl_oid sysctl__##parent##_##name = { \ >> - &sysctl_##parent##_children, \ >> - { NULL }, \ >> - nbr, \ >> - kind, \ >> - a1, \ >> - a2, \ >> - #name, \ >> - handler, \ >> - fmt, \ >> - 0, \ >> - 0, \ >> - __DESCR(descr) \ >> - }; \ >> + .oid_parent = &sysctl_##parent##_children, \ >> + .oid_number = (nbr), \ >> + .oid_kind = (kind), \ >> + .oid_arg1 = (a1), \ >> + .oid_arg2 = (a2), \ >> + .oid_name = #name, \ >> + .oid_handler = (handler), \ >> + .oid_fmt = (fmt), \ >> + .oid_descr = __DESCR(descr) \ >> + }; \ >> DATA_SET(sysctl_set, sysctl__##parent##_##name) >> >> #define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ >> > > C++ kernel modules break with this change, as C++ doesn't have the > same syntax for named initializers. > Hi, Are there any existing C++ kernel modules, or in ports? Even though, C++ kernel modules can be compiled with C files aswell, containing the sysctls. --HPS