- Re-enable the partition size check and display a warning if the install partition is too small.
- Update the required install partition size to 550MB.
svn path=/trunk/; revision=65847
ERROR_UPDATE_LOCALESETTINGS,
ERROR_ADDING_KBLAYOUTS,
ERROR_UPDATE_GEOID,
- ERROR_INSUFFICIENT_DISKSPACE,
+ ERROR_INSUFFICIENT_PARTITION_SIZE,
ERROR_PARTITION_TABLE_FULL,
ERROR_ONLY_ONE_EXTENDED,
}
-#if 0
static BOOL
IsDiskSizeValid(PPARTENTRY PartEntry)
{
- ULONGLONG m1, m2;
-
- /* check for unpartitioned space */
- m1 = PartEntry->UnpartitionedLength;
- m1 = (m1 + (1 << 19)) >> 20; /* in MBytes (rounded) */
+ ULONGLONG size;
- if( m1 > RequiredPartitionDiskSpace)
- {
- return TRUE;
- }
+ size = PartEntry->SectorCount.QuadPart * PartEntry->DiskEntry->BytesPerSector;
+ size = (size + 524288) / 1048576; /* in MBytes */
- /* check for partitioned space */
- m2 = PartEntry->PartInfo[0].PartitionLength.QuadPart;
- m2 = (m2 + (1 << 19)) >> 20; /* in MBytes (rounded) */
- if (m2 < RequiredPartitionDiskSpace)
+ if (size < RequiredPartitionDiskSpace)
{
/* partition is too small so ask for another partion */
- DPRINT1("Partition is too small(unpartitioned: %I64u MB, partitioned: %I64u MB), required disk space is %lu MB\n", m1, m2, RequiredPartitionDiskSpace);
+ DPRINT1("Partition is too small (size: %I64u MB), required disk space is %lu MB\n", size, RequiredPartitionDiskSpace);
return FALSE;
}
else
return TRUE;
}
}
-#endif
static PAGE_NUMBER
{
if (AutoPartition)
{
-#if 0
+ CreatePrimaryPartition(PartitionList,
+ PartitionList->CurrentPartition->SectorCount.QuadPart,
+ TRUE);
+
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
- MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
+ MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
+ RequiredPartitionDiskSpace);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
-#endif
- CreatePrimaryPartition(PartitionList,
- PartitionList->CurrentPartition->SectorCount.QuadPart,
- TRUE);
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
}
else
{
-#if 0
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
- MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
+ MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
+ RequiredPartitionDiskSpace);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
-#endif
+
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
return SELECT_FILE_SYSTEM_PAGE;
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN) /* ENTER */
{
-#if 0
- if (!IsDiskSizeValid(PartitionList->CurrentPartition))
- {
- MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
- return SELECT_PARTITION_PAGE; /* let the user select another partition */
- }
-#endif
if (IsContainerPartition(PartitionList->CurrentPartition->PartitionType))
continue; //return SELECT_PARTITION_PAGE;
TRUE);
}
+ if (!IsDiskSizeValid(PartitionList->CurrentPartition))
+ {
+ MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
+ RequiredPartitionDiskSpace);
+ return SELECT_PARTITION_PAGE; /* let the user select another partition */
+ }
+
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
return SELECT_FILE_SYSTEM_PAGE;
"ENTER = \8f१ ¯ã᪠¥ ª®¬¯îâêà "
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "\8d ¨§¡à ¨ï ¤ï« ï¬ ¤®áâ âêç® á¢®¡®¤® ¯à®áâà á⢮.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * \8d â¨á¥â¥ ª« ¢¨è, § ¤ ¯à®¤ê«¦¨â¥.",
NULL
},
"ENTER = Reboot computer"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Not enough free space in the selected partition.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Press any key to continue.",
NULL
},
"ENTER = Restartovat po\9f¡ta\9f"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Na zvolen\82m odd¡lu nen¡ dost voln\82ho m¡sta.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Pokra\9fujte stisknut¡m libovoln\82 kl vesy.",
NULL
},
"EINGABETASTE = Computer neu starten"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Es ist nicht gen\81gend Speicherplatz auf der\n"
- "gew\84hlten Partition vorhanden.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "Die gew\84hlten Partition ist nicht groá genug, um ReactOS zu installieren.\n"
+ "Die Installationspartition muss mindestens %lu MB groá sein.\n"
+ "\n"
" * Eine beliebige Taste zum Fortsetzen dr\81cken.",
NULL
},
"ENTER = Reboot computer"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Not enough free space in the selected partition.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Press any key to continue.",
NULL
},
"ENTER = Reiniciar el equipo"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "No hay suficiente espacio disponible en la partici¢n seleccionada.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Presione una tecla para continuar.",
NULL
},
"ENTER = Taask\84ivita arvuti"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Valitud partitsioonil pole piisavalt ruumi.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Vajuta suvalist klahvi, et j\84tkata.",
NULL
},
"ENTR\90E = Red\82marrer l'ordinateur"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Pas assez d'espace libre dans la partition s\82lectionn\82e.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Appuyer sur une touche pour continuer.",
NULL
},
"ENTER = Reboot computer"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Not enough free space in the selected partition.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Press any key to continue.",
NULL
},
"INVIO = Riavviare il computer"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Lo spazio disponibile nella partizione selezionata \8a insufficiente.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Premere un tasto qualsiasi per continuare.",
NULL
},
"ENTER = ºÝËß°ÀÉ »²·ÄÞ³"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Not enough free space in the selected partition.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Press any key to continue.",
NULL
},
"ENTER = Reboot computer"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Not enough free space in the selected partition.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Press any key to continue.",
NULL
},
"ENTER = Computer opnieuw opstarten"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Onvoldoende vrije ruimte in de geselecteerde partitie.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Druk op een toets om door te gaan.",
NULL
},
"ENTER = Restart komputera"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Brak wystarczaj¥cej wolnej przestrzeni w wybranej partycji.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Naci\98nij dowolny klawisz, aby kontynuowa\86.",
NULL
},
"ENTER=Reiniciar"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "NÆo h espa\87o suficiente na parti\87Æo selecionada.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Pressione qualquer tecla para continuar.",
NULL
},
"ENTER = Repornire calculator"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Pe partiîia selectatÇ nu existÇ suficient\n"
- "spaîiu liber."
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Tastaîi pentru a continua.",
NULL
},
"ENTER = Reboot computer"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Not enough free space in the selected partition.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Press any key to continue.",
NULL
},
"ENTER = Reçtart po\9f¡ta\9fa"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Na zvolenej part¡cii nie je dostatok vo\96n\82ho miesta.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Pokra\9fujte stla\9fen¡m \96ubovo\96n\82ho kl vesu.",
NULL
},
"ENTER = Ristarto kompjuterin"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Jo mjaft hapesir\89 e lir\89 n\89 particionin e p\89rzgjedhur.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Shtypni nj\89 tast cfar\89do p\89r t\89 vazhduar.",
NULL
},
"ENTER = Starta om datorn"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Inte tillr\84ckligt mycket fritt utrymme p\86 den valda partitionen.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * Tryck valfri tangent f\94r att forts\84tta.",
NULL
},
"Giri\9f = Bilgisayar\8d Yeniden Ba\9flat"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "Se\87ili b\94l\81mde yeterli bo\9f alan yok.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * S\81rd\81rmek i\87in bir d\81§meye bas\8dn\8dz.",
NULL
},
"ENTER = \8f¥à¥§ ¢ â ¦¨â¨ ª®¬¯'îâ¥à"
},
{
- //ERROR_INSUFFICIENT_DISKSPACE,
- "\8d¥¤®áâ âì® ¢i«ì®£® ¬iáæï ®¡à ®¬ã à®§¤i«i.\n"
+ //ERROR_INSUFFICIENT_PARTITION_SIZE,
+ "The selected partition is not large enough to install ReactOS.\n"
+ "The install partition must have a size of at least %lu MB.\n"
+ "\n"
" * \8d â¨áiâì ¡ã¤ì-ïªã ª« ¢ièã ¤«ï ¯à®¤®¢¦¥ï.",
NULL
},
MUIDisplayError(
IN ULONG ErrorNum,
OUT PINPUT_RECORD Ir,
- IN ULONG WaitEvent)
+ IN ULONG WaitEvent,
+ ...)
{
const MUI_ERROR * entry;
+ CHAR Buffer[2048];
+ va_list ap;
if (ErrorNum >= ERROR_LAST_ERROR_CODE)
{
return;
}
- PopupError(entry[ErrorNum].ErrorText,
+ va_start(ap, WaitEvent);
+ vsprintf(Buffer, entry[ErrorNum].ErrorText, ap);
+ va_end(ap);
+
+ PopupError(Buffer,
entry[ErrorNum].ErrorStatus,
Ir,
WaitEvent);
MUIDisplayError(
ULONG ErrorNum,
PINPUT_RECORD Ir,
- ULONG WaitEvent);
+ ULONG WaitEvent,
+ ...);
LPCWSTR
MUIDefaultKeyboardLayout(VOID);
[DiskSpaceRequirements]
; Required free system partition disk space in MB
-FreeSysPartDiskSpace=350
+FreeSysPartDiskSpace=550
[SourceDisksFiles]
acpi.sys=,,,,,,,,,,,,4