From owner-svn-src-all@freebsd.org Fri Sep 7 16:00:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B77D5FFE70F; Fri, 7 Sep 2018 16:00:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB4C8EDEC; Fri, 7 Sep 2018 16:00:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id D675410AFD2; Fri, 7 Sep 2018 12:00:21 -0400 (EDT) Subject: Re: svn commit: r338523 - head/sbin/sysctl To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201809071509.w87F9uEO078085@repo.freebsd.org> From: John Baldwin Message-ID: <8beb57f9-37dc-735c-fa85-78ecb67679ad@FreeBSD.org> Date: Fri, 7 Sep 2018 09:00:20 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <201809071509.w87F9uEO078085@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 07 Sep 2018 12:00:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 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: Fri, 07 Sep 2018 16:00:25 -0000 On 9/7/18 8:09 AM, Konstantin Belousov wrote: > Author: kib > Date: Fri Sep 7 15:09:56 2018 > New Revision: 338523 > URL: https://svnweb.freebsd.org/changeset/base/338523 > > Log: > Teach sysctl(8) about the Persistent memory type. > > Add PersistentMemory to the list of sysctl's known memory types > when decoding an EFI memory map. > > Submitted by: D Scott Phillips > MFC after: 1 week > Approved by: re (rgrimes) > > Modified: > head/sbin/sysctl/sysctl.c > > Modified: head/sbin/sysctl/sysctl.c > ============================================================================== > --- head/sbin/sysctl/sysctl.c Fri Sep 7 14:37:44 2018 (r338522) > +++ head/sbin/sysctl/sysctl.c Fri Sep 7 15:09:56 2018 (r338523) > @@ -704,7 +704,8 @@ S_efi_map(size_t l2, void *p) > "ACPIMemoryNVS", > "MemoryMappedIO", > "MemoryMappedIOPortSpace", > - "PalCode" > + "PalCode", > + "PersistentMemory" > }; > > /* > @@ -733,7 +734,7 @@ S_efi_map(size_t l2, void *p) > > for (i = 0; i < ndesc; i++, > map = efi_next_descriptor(map, efihdr->descriptor_size)) { > - if (map->md_type <= EFI_MD_TYPE_PALCODE) > + if (map->md_type <= EFI_MD_TYPE_PERSISTENT) Perhaps this should use nitems(types) instead? (And I believe it's my fault it didn't originally.) -- John Baldwin