Ticket #3169: LegacyBootDrive.cpp_r28723.diff

File LegacyBootDrive.cpp_r28723.diff, 784 bytes (added by oco, 16 years ago)
  • LegacyBootDrive.cpp

     
    322322    _CopyPartitionTable(newMBR, &oldMBR);
    323323   
    324324    int menuEntries = 0;
     325    int defaultMenuEntry = 0;
    325326    BMessage partition;
    326327    int32 index;
    327328    for (index = 0; settings->FindMessage("partition", index, &partition) == B_OK; index ++) {
    328329        bool show;
    329330        partition.FindBool("show", &show);
    330331        if (!show)
    331332            continue;
     333        if (index == defaultPartitionIndex)
     334            defaultMenuEntry = menuEntries;
    332335       
    333336        menuEntries ++;
    334337    }
    335338    newBootLoader.WriteInt16(menuEntries);
    336     newBootLoader.WriteInt16(defaultPartitionIndex);
     339    newBootLoader.WriteInt16(defaultMenuEntry);
    337340    newBootLoader.WriteInt16(timeout);
    338341   
    339342