From owner-svn-src-all@freebsd.org Wed Sep 2 19:09:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 627AF3C68D1; Wed, 2 Sep 2020 19:09:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BhYQX1nZkz45hr; Wed, 2 Sep 2020 19:09:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x741.google.com with SMTP id f2so793732qkh.3; Wed, 02 Sep 2020 12:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PB0TAN9QtKlDh2GsMp5HPj2uGMfQYPv+k2b9/THMWUA=; b=U6FRe/++FFXHizoxtccUXDYEuYntkkwx5KFVxuPgAKoi9vPVnaPND6yEwQyq67Gbbn b+RhoFFyJifcK1MS/FgDXyw//Z9431iDiBcbu6G2HP7qhkKxajc+yUSX3eD05QIZ/Y8O yDwWbCWVIJ/EMbfG0G5EQHto3UsCSlzg9pApzM2kg13q+Xl4MRYKlM6/H9JJXoBsOfUx lJyrZKcLYxidufwT3pVTFBp3JvcXZzUkagrUZFPwYZIoGUHJolSG8LXL0WEop3VeAbYI qkujD22cKjlONKqGx4+7SXdsKKTpiZM0ibZSEwQGWSxbS7ahs8GQiYeKVctOdFEapD0/ XIEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=PB0TAN9QtKlDh2GsMp5HPj2uGMfQYPv+k2b9/THMWUA=; b=Gxks+p4pEhqPxW+tI4WzxupwAEkQsTEhO7C30fvM8BhTLv9DVYcJIGdYJfgIWtZY7W l5mvs8akrychZajF17QtXTpFGxNGC5n99/MSIUcQY1GUASyiRCwSHS/uM4QTQtlFG35B CSpJieE4dEeG+8E1ggLFVdDMijL9gizdUWRfupNZgaRTnYJi50b6xzeop9bJjxcYMg45 3zyvHzsVO9+7amLhaTdCxjfw2z6sIc6S+wTppfXw2va3G1qTfGZxHhp2m1958I+mE16u eWK4UDrTRglb8/55PkfFGz5dYPC+WzvjykAPyomjjzEIoMs0g87W0XWi6vlTHYn4bDWv vBYw== X-Gm-Message-State: AOAM53290VLiVT/KboR40LaIA813mA9Z1qtY1YCb3aPj+yrm6dsLib/e 9r7qq/bLNT53Ro1DkmQM73nzIEEjAZqHmg== X-Google-Smtp-Source: ABdhPJzuFMxIapNN0CWuHCLmCt/YxhBU0iVUsonFpFLpXZDT8X0ayzeASkSYZWzQiDZ/NFHIeJYo+w== X-Received: by 2002:a37:9f57:: with SMTP id i84mr8679712qke.101.1599073762942; Wed, 02 Sep 2020 12:09:22 -0700 (PDT) Received: from raichu (toroon0560w-lp130-08-67-71-176-35.dsl.bell.ca. [67.71.176.35]) by smtp.gmail.com with ESMTPSA id w128sm449358qkb.6.2020.09.02.12.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 12:09:21 -0700 (PDT) Sender: Mark Johnston Date: Wed, 2 Sep 2020 15:09:17 -0400 From: Mark Johnston To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r365268 - in head: sbin/sysctl sys/kern Message-ID: <20200902190917.GA12944@raichu> References: <202009021817.082IH8nM005599@repo.freebsd.org> <043d4fe6-9961-c6fe-e93e-eb2533e0f130@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <043d4fe6-9961-c6fe-e93e-eb2533e0f130@FreeBSD.org> X-Rspamd-Queue-Id: 4BhYQX1nZkz45hr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Wed, 02 Sep 2020 19:09:24 -0000 On Wed, Sep 02, 2020 at 11:43:56AM -0700, John Baldwin wrote: > On 9/2/20 11:17 AM, Mark Johnston wrote: > > Author: markj > > Date: Wed Sep 2 18:17:08 2020 > > New Revision: 365268 > > URL: https://svnweb.freebsd.org/changeset/base/365268 > > > > Log: > > Add sysctl(8) formatting for hw.pagesizes. > > > > - Change the type of hw.pagesizes to OPAQUE, since it returns an array. > > - Modify the handler to only truncate the returned length if the caller > > supplied an output buffer. This allows use of the trick of passing a > > NULL output buffer to fetch the output size, while preserving > > compatibility if MAXPAGESIZES is increased. > > - Add a "S,pagesize" formatter to sysctl(8). > > Doesn't sysctl(8) handle scalar types that are arrays? That is, couldn't > this change just be the change to not truncate 'len' without needing to make > it opaque and needing a custom printer, etc.? I think you are right. I didn't know sysctl(8) could do that.