- 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
ERROR_UPDATE_LOCALESETTINGS,
ERROR_ADDING_KBLAYOUTS,
ERROR_UPDATE_GEOID,
+ ERROR_INSUFFICIENT_DISKSPACE,
ERROR_LAST_ERROR_CODE
}ERROR_NUMBER;
#define NDEBUG
#include <debug.h>
+/* required free disk space in MB */
+#define MINIMUMDISKSIZE 350
+
/* GLOBALS ******************************************************************/
HANDLE ProcessHeap;
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)
{
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);
}
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);
}
}
}
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)
{
"\8d¥ãá¯¥è® ¤®¡ ¢ï¥ ª« ¢¨ âãà¨â¥ ¯®¤à¥¤¡¨ ¢ ॣ¨áâêà .\n"
"ENTER = \8f१ ¯ã᪠¥ ª®¬¯îâêà "
},
+ {
+ //ERROR_INSUFFICIENT_DISKSPACE,
+ "Not enough free space in the selected partition.\n"
+ " * \8d â¨á¥â¥ ª« ¢¨è, § ¤ ¯à®¤ê«¦¨â¥.",
+ NULL
+ },
{
//ERROR_UPDATE_GEOID,
"\8d áâனª â ¥ ¬®¦ ¤ ãáâ ®¢¨ ®§ ç¨â¥«ï £¥®£à ä᪮⮠¯®«®¦¥¨¥.\n"
"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
{
6,
8,
- "Selecci¢n de idioma",
+ "Selecci¢n del idioma",
TEXT_STYLE_NORMAL
},
{
"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"
"Klaviatuuriasetusi ei ännestunud registrisse lisada.\n"
"ENTER = Taask\84ivita 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"
"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"
"Impossibile aggiungere le nazionalit\85 di tastiera al registro.\n"
"INVIO = Riavviare il computer"
},
+ {
+ //ERROR_INSUFFICIENT_DISKSPACE,
+ "Lo spazio disponibile nella partizione selezionata \8a insufficiente.\n"
+ " * Premere un tasto qualsiasi per continuare.",
+ NULL
+ },
{
//ERROR_UPDATE_GEOID,
"Setup could not set the geo id.\n"
"¾¯Ä±¯ÌßÊ geo id ¦ ¾¯Ã² ÃÞ·Ï¾Ý ÃÞ¼À¡\n"
"ENTER = ºÝËß°ÀÉ »²·ÄÞ³"
},
+ {
+ //ERROR_INSUFFICIENT_DISKSPACE,
+ "Not enough free space in the selected partition.\n"
+ " * Press any key to continue.",
+ NULL
+ },
{
NULL,
NULL
"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"
"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"
"Instalator nie m¢g\88 doda\86 uk\88ad¢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\88 ustawi\86 lokalizacji geograficznej.\n"
"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"
"Inçtal tor zlyhal pri prid van¡ rozlo§en¡ kl vesnice do registrov.\n"
"ENTER = Reçtart po\9f¡ta\9fa"
},
+ {
+ //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\9c geo id.\n"
"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"
"\8d¥ ¢¤ «®áì ¤®¤ ⨠஧ª« ¤ª¨ ª« ¢i âãਠ¤® à¥óáâàã.\n"
"ENTER = \8f¥à¥§ ¢ â ¦¨â¨ ª®¬¯'îâ¥à"
},
+ {
+ //ERROR_INSUFFICIENT_DISKSPACE,
+ "Not enough free space in the selected partition.\n"
+ " * Press any key to continue.",
+ NULL
+ },
{
//ERROR_UPDATE_GEOID,
"\8d¥ ¢¤ «®áì ¢áâ ®¢¨â¨ geo id.\n"