From 7b51470a327c551d0e40fc40236aafcdd1b23ea6 Mon Sep 17 00:00:00 2001 From: Michael Pfeiffer Date: Sun, 20 Apr 2008 18:29:48 +0000 Subject: [PATCH] When writing the MBR, don't overwrite disk signature and the reserved word. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25088 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bootman/LegacyBootDrive.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apps/bootman/LegacyBootDrive.cpp b/src/apps/bootman/LegacyBootDrive.cpp index 36e4e6876d..176be6d74b 100644 --- a/src/apps/bootman/LegacyBootDrive.cpp +++ b/src/apps/bootman/LegacyBootDrive.cpp @@ -254,11 +254,11 @@ LegacyBootDrive::ReadPartitions(BMessage *settings) off_t size = sizeof(kBootLoader); if (!recorder.HasPartitions() || recorder.FirstOffset() < size) return kErrorBootSectorTooSmall; + + // TODO remove when booting from all drives works + break; #endif } - - // TODO remove when booting from all drives works - break; } #if USE_SECOND_DISK @@ -514,7 +514,8 @@ void LegacyBootDrive::_CopyPartitionTable(MasterBootRecord* destination, const MasterBootRecord* source) { - memcpy(destination->partition, source->partition, sizeof(source->partition)); + memcpy(destination->diskSignature, source->diskSignature, + sizeof(source->diskSignature) + sizeof(source->reserved) + sizeof(source->partition)); }