Module Name: src
Committed By: martin
Date: Sat Aug 13 09:34:47 UTC 2022
Modified Files:
src/sys/arch/macppc/macppc: disksubr.c
Log Message:
Do not try to create a fake MBR disklabel from the PMBR of a GPT disk.
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/macppc/macppc/disksubr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/macppc/macppc/disksubr.c
diff -u src/sys/arch/macppc/macppc/disksubr.c:1.49 src/sys/arch/macppc/macppc/disksubr.c:1.50
--- src/sys/arch/macppc/macppc/disksubr.c:1.49 Fri Mar 14 21:59:41 2014
+++ src/sys/arch/macppc/macppc/disksubr.c Sat Aug 13 09:34:47 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.49 2014/03/14 21:59:41 mrg Exp $ */
+/* $NetBSD: disksubr.c,v 1.50 2022/08/13 09:34:47 martin Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -106,7 +106,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.49 2014/03/14 21:59:41 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.50 2022/08/13 09:34:47 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -497,6 +497,8 @@ read_dos_label(dev_t dev, void (*strat)(
bsdp = NULL;
for (i = 0; i < MBR_PART_COUNT; i++, dp++) {
switch (dp->mbrp_type) {
+ case MBR_PTYPE_PMBR:
+ goto done; /* do not fake anything for GPT disks */
case MBR_PTYPE_NETBSD:
bsdp = dp;
break;