- 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) if (PartitionList == NULL)
{ {
PartitionList = CreatePartitionList(2, PartitionList = CreatePartitionList(2,
21, 23,
xScreen - 3, xScreen - 3,
yScreen - 3); yScreen - 3);
if (PartitionList == NULL) if (PartitionList == NULL)
@ -1476,10 +1476,19 @@ SelectPartitionPage(PINPUT_RECORD Ir)
if (!SelectPartition(PartitionList, UnattendDestinationDiskNumber, UnattendDestinationPartitionNumber)) if (!SelectPartition(PartitionList, UnattendDestinationDiskNumber, UnattendDestinationPartitionNumber))
{ {
if (AutoPartition) if (AutoPartition)
{
if (PartitionList->CurrentPartition->LogicalPartition)
{
CreateLogicalPartition(PartitionList,
PartitionList->CurrentPartition->SectorCount.QuadPart,
TRUE);
}
else
{ {
CreatePrimaryPartition(PartitionList, CreatePrimaryPartition(PartitionList,
PartitionList->CurrentPartition->SectorCount.QuadPart, PartitionList->CurrentPartition->SectorCount.QuadPart,
TRUE); TRUE);
}
if (!IsDiskSizeValid(PartitionList->CurrentPartition)) if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{ {
@ -1578,11 +1587,20 @@ SelectPartitionPage(PINPUT_RECORD Ir)
if (PartitionList->CurrentPartition == NULL || if (PartitionList->CurrentPartition == NULL ||
PartitionList->CurrentPartition->IsPartitioned == FALSE) PartitionList->CurrentPartition->IsPartitioned == FALSE)
{
if (PartitionList->CurrentPartition->LogicalPartition)
{
CreateLogicalPartition(PartitionList,
0ULL,
TRUE);
}
else
{ {
CreatePrimaryPartition(PartitionList, CreatePrimaryPartition(PartitionList,
0ULL, 0ULL,
TRUE); TRUE);
} }
}
if (!IsDiskSizeValid(PartitionList->CurrentPartition)) if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{ {
@ -2203,7 +2221,8 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir)
DPRINT("Partition size: %I64u bytes\n", PartSize); DPRINT("Partition size: %I64u bytes\n", PartSize);
CreateLogicalPartition(PartitionList, CreateLogicalPartition(PartitionList,
SectorCount); SectorCount,
FALSE);
return SELECT_PARTITION_PAGE; return SELECT_PARTITION_PAGE;
} }

View file

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

View file

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

View file

@ -809,6 +809,12 @@ static MUI_ENTRY csCZSelectPartitionEntries[] =
{ {
8, 8,
19, 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.", "\x07 StisknutĄm D umo§nĄte smaz nĄ existujĄcĄho oddĄlu.",
TEXT_STYLE_NORMAL TEXT_STYLE_NORMAL
}, },

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -857,6 +857,12 @@ static MUI_ENTRY roROSelectPartitionEntries[] =
{ {
8, 8,
19, 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Ç.", "\x07 Tastaîi D pentru a ­terge o partiîie existentÇ.",
TEXT_STYLE_NORMAL TEXT_STYLE_NORMAL
}, },

View file

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

View file

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

View file

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

View file

@ -809,6 +809,12 @@ static MUI_ENTRY svSESelectPartitionEntries[] =
{ {
8, 8,
19, 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.", "\x07 Tryck D f”r att ta bort en befintlig partititon.",
TEXT_STYLE_NORMAL TEXT_STYLE_NORMAL
}, },

View file

@ -795,6 +795,12 @@ static MUI_ENTRY trTRSelectPartitionEntries[] =
{ {
8, 8,
19, 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.", "\x07 Var olan bir b”l<E2809D>m silmek i‡in D'ye bas<61>n<EFBFBD>z.",
TEXT_STYLE_NORMAL TEXT_STYLE_NORMAL
}, },

View file

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

View file

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

View file

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