- Add description of the 'L' key to the partition selection page.
- Make the 'ENTER' key work for logical partitions too. Selected unpartitioned space will be converted to a logical partition.
Patch by Gerhard Gruber (sparhawk).
CORE-9641 #resolve 

svn path=/trunk/; revision=68339
This commit is contained in:
Eric Kohl 2015-07-04 16:04:09 +00:00
parent aeed3091c7
commit 5e346150a3
26 changed files with 171 additions and 11 deletions

View file

@ -1454,7 +1454,7 @@ SelectPartitionPage(PINPUT_RECORD Ir)
if (PartitionList == NULL)
{
PartitionList = CreatePartitionList(2,
21,
23,
xScreen - 3,
yScreen - 3);
if (PartitionList == NULL)
@ -1477,9 +1477,18 @@ SelectPartitionPage(PINPUT_RECORD Ir)
{
if (AutoPartition)
{
CreatePrimaryPartition(PartitionList,
PartitionList->CurrentPartition->SectorCount.QuadPart,
TRUE);
if (PartitionList->CurrentPartition->LogicalPartition)
{
CreateLogicalPartition(PartitionList,
PartitionList->CurrentPartition->SectorCount.QuadPart,
TRUE);
}
else
{
CreatePrimaryPartition(PartitionList,
PartitionList->CurrentPartition->SectorCount.QuadPart,
TRUE);
}
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
@ -1579,9 +1588,18 @@ SelectPartitionPage(PINPUT_RECORD Ir)
if (PartitionList->CurrentPartition == NULL ||
PartitionList->CurrentPartition->IsPartitioned == FALSE)
{
CreatePrimaryPartition(PartitionList,
0ULL,
TRUE);
if (PartitionList->CurrentPartition->LogicalPartition)
{
CreateLogicalPartition(PartitionList,
0ULL,
TRUE);
}
else
{
CreatePrimaryPartition(PartitionList,
0ULL,
TRUE);
}
}
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
@ -2203,7 +2221,8 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir)
DPRINT("Partition size: %I64u bytes\n", PartSize);
CreateLogicalPartition(PartitionList,
SectorCount);
SectorCount,
FALSE);
return SELECT_PARTITION_PAGE;
}

View file

@ -811,6 +811,12 @@ static MUI_ENTRY bgBGSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 <20> â¨á­¥â¥ D §  ¨§âਢ ­¥ ­  áêé¥áâ¢ã¢ é ¤ï«.",
TEXT_STYLE_NORMAL
},

View file

@ -801,6 +801,12 @@ static MUI_ENTRY bnBDSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Press D to delete an existing partition.",
TEXT_STYLE_NORMAL
},

View file

@ -809,6 +809,12 @@ static MUI_ENTRY csCZSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 StisknutĄm D umo§nĄte smaz nĄ existujĄcĄho oddĄlu.",
TEXT_STYLE_NORMAL
},

View file

@ -796,6 +796,12 @@ static MUI_ENTRY deDESelectPartitionEntries[] =
{
8,
19,
"\x07 L erstellt eine logische Partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 D l”scht eine vorhandene Partition.",
TEXT_STYLE_NORMAL
},

View file

@ -814,6 +814,12 @@ static MUI_ENTRY elGRSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 <20>˜«ã©«œ D š ˜ ¤˜ › ˜š¨á¯œ«œ ⤘ ¬§á¨®¦¤ › ˜£â¨ ©£˜.",
TEXT_STYLE_NORMAL
},

View file

@ -801,6 +801,12 @@ static MUI_ENTRY enUSSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Press D to delete an existing partition.",
TEXT_STYLE_NORMAL
},

View file

@ -809,6 +809,12 @@ static MUI_ENTRY esESSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Presione D para borrar una partici¢n existente.",
TEXT_STYLE_NORMAL
},

View file

@ -802,6 +802,12 @@ static MUI_ENTRY etEESelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Vajuta D, et kustutada olemasolev partitsioon.",
TEXT_STYLE_NORMAL
},

View file

@ -814,6 +814,12 @@ static MUI_ENTRY frFRSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Appuyer sur D pour effacer une partition.",
TEXT_STYLE_NORMAL
},

View file

@ -802,6 +802,12 @@ static MUI_ENTRY heILSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Press D to delete an existing partition.",
TEXT_STYLE_NORMAL
},

View file

@ -809,6 +809,12 @@ static MUI_ENTRY itITSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Premere D per cancellare una partizione esistente.",
TEXT_STYLE_NORMAL
},

View file

@ -803,6 +803,12 @@ static MUI_ENTRY jaJPSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 ·¿ÝÉ Ê߰輮ݦ »¸¼Þ® ½ÙÆÊ D ·°¦ µ¼Ã ¸ÀÞ»²¡",
TEXT_STYLE_NORMAL
},

View file

@ -811,6 +811,12 @@ static MUI_ENTRY ltLTSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Press D to delete an existing partition.",
TEXT_STYLE_NORMAL
},

View file

@ -831,6 +831,12 @@ static MUI_ENTRY nlNLSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Druk op D om een bestaande partitie te verwijderen.",
TEXT_STYLE_NORMAL
},

View file

@ -811,6 +811,12 @@ static MUI_ENTRY plPLSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Naci<63>nij D, by skasowa† istniejĄcĄ partycj©.",
TEXT_STYLE_NORMAL
},

View file

@ -821,6 +821,12 @@ static MUI_ENTRY ptBRSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Para excluir a parti‡Æo selecionada, pressione D.",
TEXT_STYLE_NORMAL
},

View file

@ -857,6 +857,12 @@ static MUI_ENTRY roROSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Tastaîi D pentru a ­terge o partiîie existentÇ.",
TEXT_STYLE_NORMAL
},

View file

@ -802,6 +802,12 @@ static MUI_ENTRY ruRUSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 <20> ¦¬¨â¥ D ¤«ï 㤠«¥­¨ï áãé¥áâ¢ãî饣® à §¤¥« .",
TEXT_STYLE_NORMAL
},

View file

@ -810,6 +810,12 @@ static MUI_ENTRY skSKSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Stlaźte D pre vymazanie existujŁcej oblasti.",
TEXT_STYLE_NORMAL
},

View file

@ -806,6 +806,12 @@ static MUI_ENTRY sqALSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Kliko D p‰r t‰ fshir‰ nj‰ particion ekzistues.",
TEXT_STYLE_NORMAL
},

View file

@ -809,6 +809,12 @@ static MUI_ENTRY svSESelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Tryck D f”r att ta bort en befintlig partititon.",
TEXT_STYLE_NORMAL
},

View file

@ -795,6 +795,12 @@ static MUI_ENTRY trTRSelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 Var olan bir b”l<E2809D>m silmek i‡in D'ye bas<61>n<EFBFBD>z.",
TEXT_STYLE_NORMAL
},

View file

@ -808,6 +808,12 @@ static MUI_ENTRY ukUASelectPartitionEntries[] =
{
8,
19,
"\x07 Press L to create a logical partition.",
TEXT_STYLE_NORMAL
},
{
8,
21,
"\x07 <20> â¨á­iâì D 鮡 ¢¨¤ «¨â¨ iá­ãî稩 ஧¤i«.",
TEXT_STYLE_NORMAL
},

View file

@ -2762,7 +2762,8 @@ CreateExtendedPartition(
VOID
CreateLogicalPartition(
PPARTLIST List,
ULONGLONG SectorCount)
ULONGLONG SectorCount,
BOOLEAN AutoCreate)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -2783,7 +2784,8 @@ CreateLogicalPartition(
DPRINT1("Current partition sector count: %I64u\n", PartEntry->SectorCount.QuadPart);
if (Align(PartEntry->StartSector.QuadPart + SectorCount, DiskEntry->SectorAlignment) - PartEntry->StartSector.QuadPart == PartEntry->SectorCount.QuadPart)
if (AutoCreate == TRUE ||
Align(PartEntry->StartSector.QuadPart + SectorCount, DiskEntry->SectorAlignment) - PartEntry->StartSector.QuadPart == PartEntry->SectorCount.QuadPart)
{
DPRINT1("Convert existing partition entry\n");

View file

@ -253,7 +253,8 @@ CreateExtendedPartition(
VOID
CreateLogicalPartition(
PPARTLIST List,
ULONGLONG SectorCount);
ULONGLONG SectorCount,
BOOLEAN AutoCreate);
VOID
DeleteCurrentPartition(