From d4bdf8ed9a8482a5f638cf5024b162b6fa040ea9 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 7 Sep 2018 15:09:56 +0000 Subject: [PATCH] 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) --- sbin/sysctl/sysctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 30bb0a974cc..427f3e2309b 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -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) type = types[map->md_type]; else type = "";