From 06c144159174fa2c36b76bbac64ab9fc958509a9 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Thu, 3 Jun 2021 15:05:56 +0000 Subject: Recognize the Apple APFS GPT partition types seen on Apple M1 boxen. ok kettenis@ --- distrib/miniroot/install.sub | 5 ++++- sbin/fdisk/part.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index b9f0b400a82..1a1fb871ed2 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1164 2021/05/03 11:34:55 sthen Exp $ +# $OpenBSD: install.sub,v 1.1165 2021/06/03 15:05:55 krw Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -380,6 +380,9 @@ disk_has() { # Patterns for partition-table-types and partition-types. local _p_gpt='Usable LBA:' local _p_gpt_openbsd='^[ *]...: OpenBSD ' + local _p_gpt_apfs='^[ *]...: APFS ' + local _p_gpt_apfsisc='^[ *]...: APFS ISC ' + local _p_gpt_apfsrecovery='^[ *]...: APFS Recovry ' local _p_gpt_efisys='^[ *]...: EFI Sys ' local _p_hfs='^Partition map ' local _p_hfs_openbsd=' OpenBSD OpenBSD ' diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c index 875ad48a2a0..9d51cb81139 100644 --- a/sbin/fdisk/part.c +++ b/sbin/fdisk/part.c @@ -1,4 +1,4 @@ -/* $OpenBSD: part.c,v 1.80 2021/05/15 19:44:15 krw Exp $ */ +/* $OpenBSD: part.c,v 1.81 2021/06/03 15:05:55 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -114,6 +114,9 @@ static const struct part_type { { 0xA9, "NetBSD ", "516e7cb4-6ecf-11d6-8ff8-00022d09712b" }, { 0xAB, "MacOS X boot", "426f6f74-0000-11aa-aa11-00306543ecac" }, { 0xAF, "MacOS X HFS+", "48465300-0000-11aa-aa11-00306543ecac" }, + { 0xB0, "APFS ", "7c3457ef-0000-11aa-aa11-00306543ecac" }, + { 0xB1, "APFS ISC ", "69646961-6700-11aa-aa11-00306543ecac" }, + { 0xB2, "APFS Recovry", "52637672-7900-11aa-aa11-00306543ecac" }, { 0xB7, "BSDI filesy*"}, /* BSDI BSD/386 filesystem */ { 0xB8, "BSDI swap "}, /* BSDI BSD/386 swap */ { 0xBF, "Solaris ", "6a85cf4d-1dd2-11b2-99a6-080020736631" }, -- cgit v1.2.3