- Check for required minimum disk space eventually warn the user.
- Added Italian and Spanish warnings, the other languages need translation.
- Patch by R.T.Sivakumar modified by me.
See issue #3302 for more details.

svn path=/trunk/; revision=47341
This commit is contained in:
Gabriel Ilardi 2010-05-24 20:53:32 +00:00
parent 8a591ca9df
commit d1f4ced4ab
16 changed files with 130 additions and 3 deletions

View file

@ -65,6 +65,7 @@ typedef enum
ERROR_UPDATE_LOCALESETTINGS,
ERROR_ADDING_KBLAYOUTS,
ERROR_UPDATE_GEOID,
ERROR_INSUFFICIENT_DISKSPACE,
ERROR_LAST_ERROR_CODE
}ERROR_NUMBER;

View file

@ -31,6 +31,9 @@
#define NDEBUG
#include <debug.h>
/* required free disk space in MB */
#define MINIMUMDISKSIZE 350
/* GLOBALS ******************************************************************/
HANDLE ProcessHeap;
@ -1381,6 +1384,31 @@ LayoutSettingsPage(PINPUT_RECORD Ir)
return DISPLAY_SETTINGS_PAGE;
}
static BOOL IsDiskSizeValid(PPARTENTRY PartEntry)
{
ULONGLONG m;
/* check for unpartitioned space */
m = PartEntry->UnpartitionedLength;
m = (m + (1 << 19)) >> 20; /* in MBytes (rounded) */
if( m > MINIMUMDISKSIZE)
{
return TRUE;
}
// check for partitioned space
m = PartEntry->PartInfo[0].PartitionLength.QuadPart;
m = (m + (1 << 19)) >> 20; /* in MBytes (rounded) */
if( m < MINIMUMDISKSIZE)
{
/* partition is too small so ask for another partion */
DPRINT1("Partition too small");
return FALSE;
}
else
{
return TRUE;
}
}
static PAGE_NUMBER
SelectPartitionPage(PINPUT_RECORD Ir)
@ -1434,9 +1462,13 @@ SelectPartitionPage(PINPUT_RECORD Ir)
{
if (AutoPartition)
{
PPARTENTRY PartEntry = PartEntry = PartitionList->CurrentPartition;
PPARTENTRY PartEntry = PartitionList->CurrentPartition;
ULONG MaxSize = (PartEntry->UnpartitionedLength + (1 << 19)) >> 20; /* in MBytes (rounded) */
if(!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
CreateNewPartition(PartitionList,
MaxSize,
TRUE);
@ -1446,6 +1478,11 @@ SelectPartitionPage(PINPUT_RECORD Ir)
}
else
{
if(!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
return(SELECT_FILE_SYSTEM_PAGE);
}
}
@ -1489,6 +1526,11 @@ SelectPartitionPage(PINPUT_RECORD Ir)
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN) /* ENTER */
{
if(!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
if (PartitionList->CurrentPartition == NULL ||
PartitionList->CurrentPartition->Unpartitioned == TRUE)
{

View file

@ -1483,6 +1483,12 @@ MUI_ERROR bgBGErrorEntries[] =
"<EFBFBD>¥ãᯥ譮 ¤®¡ ¢ï­¥ ­  ª« ¢¨ âã୨⥠¯®¤à¥¤¡¨ ¢ ॣ¨áâêà .\n"
"ENTER = <20>१ ¯ã᪠­¥ ­  ª®¬¯îâêà "
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * <20> â¨á­¥â¥ ª« ¢¨è, §  ¤  ¯à®¤ê«¦¨â¥.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"<EFBFBD> áâனª â  ­¥ ¬®¦  ¤  ãáâ ­®¢¨ ®§­ ç¨â¥«ï ­  £¥®£à ä᪮⮠¯®«®¦¥­¨¥.\n"

View file

@ -1476,6 +1476,12 @@ MUI_ERROR enUSErrorEntries[] =
"Setup could not set the geo id.\n"
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
NULL,
NULL

View file

@ -18,7 +18,7 @@ static MUI_ENTRY esESLanguagePageEntries[] =
{
6,
8,
"Selecci¢n de idioma",
"Selecci¢n del idioma",
TEXT_STYLE_NORMAL
},
{
@ -1472,6 +1472,12 @@ MUI_ERROR esESErrorEntries[] =
"Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"No hay suficiente espacio disponible en la partici¢n seleccionada.\n"
" * Presione una tecla para continuar.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Setup could not set the geo id.\n"

View file

@ -1468,6 +1468,12 @@ MUI_ERROR etEEErrorEntries[] =
"Klaviatuuriasetusi ei ännestunud registrisse lisada.\n"
"ENTER = Taask„ivita arvuti"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Geograafilist asukohta ei ännestunud seadistada.\n"

View file

@ -1484,6 +1484,12 @@ MUI_ERROR frFRErrorEntries[] =
"Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Setup could not set the geo id.\n"

View file

@ -1472,6 +1472,12 @@ MUI_ERROR itITErrorEntries[] =
"Impossibile aggiungere le nazionalit… di tastiera al registro.\n"
"INVIO = Riavviare il computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Lo spazio disponibile nella partizione selezionata Š insufficiente.\n"
" * Premere un tasto qualsiasi per continuare.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Setup could not set the geo id.\n"

View file

@ -1477,6 +1477,12 @@ MUI_ERROR jaJPErrorEntries[] =
"¾¯Ä±¯ÌßÊ geo id ¦ ¾¯Ã² ÃÞ·Ï¾Ý ÃÞ¼À¡\n"
"ENTER = ºÝËß­°ÀÉ »²·ÄÞ³"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
NULL,
NULL

View file

@ -1481,6 +1481,12 @@ MUI_ERROR ltLTErrorEntries[] =
"Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Setup could not set the geo id.\n"

View file

@ -1499,6 +1499,12 @@ MUI_ERROR nlNLErrorEntries[] =
"Setup kan de toetsenbord indelingen niet toevoegen aan de registry.\n"
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Setup kan de geografische positie niet instellen.\n"

View file

@ -1480,6 +1480,12 @@ MUI_ERROR plPLErrorEntries[] =
"Instalator nie m¢gˆ doda† ukˆad¢w klawiatury do rejestru.\n"
"ENTER = Restart komputera"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Instalator nie m¢gˆ ustawi† lokalizacji geograficznej.\n"

View file

@ -1472,6 +1472,12 @@ MUI_ERROR ruRUErrorEntries[] =
"Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Setup could not set the geo id.\n"

View file

@ -1482,6 +1482,12 @@ MUI_ERROR skSKErrorEntries[] =
"Inçtal tor zlyhal pri prid van¡ rozlo§en¡ kl vesnice do registrov.\n"
"ENTER = Reçtart poŸ¡taŸa"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Inçtal tor nemohol nastaviœ geo id.\n"

View file

@ -1472,6 +1472,12 @@ MUI_ERROR svSEErrorEntries[] =
"Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"Setup could not set the geo id.\n"

View file

@ -1478,6 +1478,12 @@ MUI_ERROR ukUAErrorEntries[] =
"<EFBFBD>¥ ¢¤ «®áì ¤®¤ â¨ à®§ª« ¤ª¨ ª« ¢i âãਠ¤® à¥óáâàã.\n"
"ENTER = <20>¥à¥§ ¢ ­â ¦¨â¨ ª®¬¯'îâ¥à"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
" * Press any key to continue.",
NULL
},
{
//ERROR_UPDATE_GEOID,
"<EFBFBD>¥ ¢¤ «®áì ¢áâ ­®¢¨â¨ geo id.\n"