summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2014-02-05 03:51:07 +0000
committerkrw <krw@openbsd.org>2014-02-05 03:51:07 +0000
commitb43f4fc750b118bd9138a2e8228274b32fd8171f (patch)
treebf3fe97eb4ec44a1dddf7d9d1499ae71f0b206c8
parentMore crash dump parsing fixes: correct paddr in process info and pids (diff)
downloadwireguard-openbsd-b43f4fc750b118bd9138a2e8228274b32fd8171f.tar.xz
wireguard-openbsd-b43f4fc750b118bd9138a2e8228274b32fd8171f.zip
Always set the signature to DOSMBR_SIGNATURE when writing a MBR to
disk. This means skipping the '(U)pdate' command after editing the MBR will still produce something disklabel(8) will respect in the morning. Problem noted by David Vasek. ok jsing@ toby@. Moral support halex@.
-rw-r--r--sbin/fdisk/mbr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fdisk/mbr.c b/sbin/fdisk/mbr.c
index b4ba5009a3a..45eeda9c852 100644
--- a/sbin/fdisk/mbr.c
+++ b/sbin/fdisk/mbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbr.c,v 1.31 2013/10/08 15:45:43 krw Exp $ */
+/* $OpenBSD: mbr.c,v 1.32 2014/02/05 03:51:07 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -127,7 +127,7 @@ MBR_make(mbr_t *mbr, char *mbr_buf)
int i;
memcpy(mbr_buf, mbr->code, MBR_CODE_SIZE);
- putshort(&mbr_buf[MBR_SIG_OFF], mbr->signature);
+ putshort(&mbr_buf[MBR_SIG_OFF], DOSMBR_SIGNATURE);
for (i = 0; i < NDOSPART; i++)
PRT_make(&mbr->part[i], mbr->offset, mbr->reloffset,