Applied patch of ticket #3169 by oco: Set default partition correctly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29626 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -322,6 +322,7 @@ LegacyBootDrive::WriteBootMenu(BMessage *settings)
|
|||||||
_CopyPartitionTable(newMBR, &oldMBR);
|
_CopyPartitionTable(newMBR, &oldMBR);
|
||||||
|
|
||||||
int menuEntries = 0;
|
int menuEntries = 0;
|
||||||
|
int defaultMenuEntry = 0;
|
||||||
BMessage partition;
|
BMessage partition;
|
||||||
int32 index;
|
int32 index;
|
||||||
for (index = 0; settings->FindMessage("partition", index, &partition) == B_OK; index ++) {
|
for (index = 0; settings->FindMessage("partition", index, &partition) == B_OK; index ++) {
|
||||||
@@ -329,11 +330,13 @@ LegacyBootDrive::WriteBootMenu(BMessage *settings)
|
|||||||
partition.FindBool("show", &show);
|
partition.FindBool("show", &show);
|
||||||
if (!show)
|
if (!show)
|
||||||
continue;
|
continue;
|
||||||
|
if (index == defaultPartitionIndex)
|
||||||
|
defaultMenuEntry = menuEntries;
|
||||||
|
|
||||||
menuEntries ++;
|
menuEntries ++;
|
||||||
}
|
}
|
||||||
newBootLoader.WriteInt16(menuEntries);
|
newBootLoader.WriteInt16(menuEntries);
|
||||||
newBootLoader.WriteInt16(defaultPartitionIndex);
|
newBootLoader.WriteInt16(defaultMenuEntry);
|
||||||
newBootLoader.WriteInt16(timeout);
|
newBootLoader.WriteInt16(timeout);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user