2 * Copyright 2008-2011, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de
7 * Michael Pfeiffer <laplace@users.sourceforge.net>
9 #ifndef LEGACY_BOOT_MENU_H
10 #define LEGACY_BOOT_MENU_H
15 #include <SupportDefs.h>
18 struct MasterBootRecord
;
21 class LegacyBootMenu
: public BootMenu
{
24 virtual ~LegacyBootMenu();
26 virtual bool IsInstalled(const BootDrive
& drive
);
27 virtual status_t
CanBeInstalled(const BootDrive
& drive
);
29 virtual status_t
CollectPartitions(const BootDrive
& drive
,
32 virtual status_t
Install(const BootDrive
& drive
,
34 virtual status_t
SaveMasterBootRecord(BMessage
* settings
,
36 virtual status_t
RestoreMasterBootRecord(BMessage
* settings
,
38 virtual status_t
GetDisplayText(const char* text
,
39 BString
& displayText
);
42 bool _ConvertToBIOSText(const char* text
,
44 status_t
_GetBIOSDrive(const char* device
,
46 status_t
_ReadBlocks(int fd
, uint8
* buffer
, size_t size
);
47 status_t
_WriteBlocks(int fd
, const uint8
* buffer
,
49 void _CopyPartitionTable(
50 MasterBootRecord
* destination
,
51 const MasterBootRecord
* source
);
52 bool _IsValid(const MasterBootRecord
* mbr
);
56 #endif // LEGACY_BOOT_MENU_H