From: krw Date: Fri, 2 Sep 2022 07:46:03 +0000 (+0000) Subject: Adopt a terser specification of an MBR partition table of X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ed815834e9ee167af8ecbf9217cc2f0d6abc124;p=openbsd Adopt a terser specification of an MBR partition table of 64 zeros, suggested by miod@ a while ago. ok mlarkin@ --- diff --git a/sys/arch/amd64/stand/mbr/mbr.S b/sys/arch/amd64/stand/mbr/mbr.S index 6fd9e6ade88..8d8c9f38c21 100644 --- a/sys/arch/amd64/stand/mbr/mbr.S +++ b/sys/arch/amd64/stand/mbr/mbr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: mbr.S,v 1.8 2022/08/15 04:17:50 daniel Exp $ */ +/* $OpenBSD: mbr.S,v 1.9 2022/09/02 07:46:03 krw Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff and Tobias Weingartner @@ -513,15 +513,7 @@ endofcode: /* partition table */ /* flag, head, sec, cyl, type, ehead, esect, ecyl, start, len */ . = DOSPARTOFF /* starting address of partition table */ -pt: - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 +pt: .fill 0x40,1,0 /* the last 2 bytes in the sector 0 contain the signature */ . = 0x1fe signature: diff --git a/sys/arch/i386/stand/mbr/mbr.S b/sys/arch/i386/stand/mbr/mbr.S index 82c08f5ad1e..cc172b692f2 100644 --- a/sys/arch/i386/stand/mbr/mbr.S +++ b/sys/arch/i386/stand/mbr/mbr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: mbr.S,v 1.26 2022/08/15 04:17:51 daniel Exp $ */ +/* $OpenBSD: mbr.S,v 1.27 2022/09/02 07:46:03 krw Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff and Tobias Weingartner @@ -513,15 +513,7 @@ endofcode: /* partition table */ /* flag, head, sec, cyl, type, ehead, esect, ecyl, start, len */ . = DOSPARTOFF /* starting address of partition table */ -pt: - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 - .byte 0x0,0,0,0,0,0,0,0 - .long 0,0 +pt: .fill 0x40,1,0 /* the last 2 bytes in the sector 0 contain the signature */ . = 0x1fe signature: