[USETUP] Don't error out in case one tries to "delete" empty partition space.

Just... don't delete it ¯\_(ツ)_/¯
This commit is contained in:
Hermès Bélusca-Maïto 2023-11-18 22:43:36 +01:00
parent b578846d82
commit 5ee1dc6113
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
32 changed files with 4 additions and 216 deletions

View file

@ -32,7 +32,6 @@ typedef enum _ERROR_NUMBER
ERROR_LOAD_KBLAYOUT,
ERROR_WARN_PARTITION,
ERROR_NEW_PARTITION,
ERROR_DELETE_SPACE,
ERROR_INSTALL_BOOTCODE,
ERROR_NO_FLOPPY,
ERROR_UPDATE_KBSETTINGS,

View file

@ -1952,13 +1952,6 @@ MUI_ERROR bgBGErrorEntries[] =
" * \215\240\342\250\341\255\245\342\245 \252\253\240\242\250\350, \247\240 \244\240 \257\340\256\244\352\253\246\250\342\245.",
NULL
},
{
// ERROR_DELETE_SPACE,
"\215\245 \254\256\246\245\342\245 \247\240 \250\247\342\340\250\245\342\245 \255\245\247\240\244\245\253\245\255\256\342\256 \244\250\341\252\256\242\256 \254\357\341\342\256!\n"
"\n"
" * \215\240\342\250\341\255\245\342\245 \252\253\240\242\250\350, \247\240 \244\240 \257\340\256\244\352\253\246\250\342\245.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
//"Setup failed to install the FAT bootcode on the system partition.",

View file

@ -1928,13 +1928,6 @@ MUI_ERROR bnBDErrorEntries[] =
" * Press any key to continue.",
NULL
},
{
// ERROR_DELETE_SPACE,
"You cannot delete unpartitioned disk space!\n"
"\n"
" * Press any key to continue.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Setup failed to install the %S bootcode on the system partition.",

View file

@ -1936,13 +1936,6 @@ MUI_ERROR csCZErrorEntries[] =
" * Pokra\237ujte stisknut\241m libovoln\202 kl\240vesy.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Nelze vymazat m\241sto na disku, kter\202 nepat\375\241 \247\240dn\202mu odd\241lu!\n"
"\n"
" * Pokra\237ujte stisknut\241m libovoln\202 kl\240vesy.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Nepoda\375ilo se nainstalovat %S zavad\330\237 na syst\202mov\354 odd\241l.",

View file

@ -1937,13 +1937,6 @@ MUI_ERROR daDKErrorEntries[] =
" * Tryk p\206 en vilk\206rligtast for at forts\221tte.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Du kan ikke slette upartitionernet diskplads!\n"
"\n"
" * Tryk p\206 en vilk\206rligtast for at forts\221tte.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Installationen kunne ikke installere %S-startkode p\206 systempartitionen.",

View file

@ -1937,13 +1937,6 @@ MUI_ERROR deDEErrorEntries[] =
" * * Eine beliebige Taste zum Fortsetzen dr\201cken.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Sie k\224nnen unpartitionierten Speicher nicht l\224schen!\n"
"\n"
" * Eine beliebige Taste zum Fortsetzen dr\201cken.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Der %S-Bootcode konnte nicht auf der Partition installiert werden.",

View file

@ -1958,13 +1958,6 @@ MUI_ERROR elGRErrorEntries[] =
" * \217\230\253\343\251\253\234 \246\247\246\240\246\233\343\247\246\253\234 \247\242\343\241\253\250\246 \232\240\230 \244\230 \251\254\244\234\256\345\251\234\253\234.",
NULL
},
{
// ERROR_DELETE_SPACE,
"\203\234 \243\247\246\250\234\345\253\234 \244\230 \233\240\230\232\250\341\257\234\253\234 \342\244\230\244 \243\236 \233\240\230\243\246\250\255\340\243\342\244\246 \256\351\250\246 \233\345\251\241\246\254!\n"
"\n"
" * \217\230\253\343\251\253\234 \246\247\246\240\246\233\343\247\246\253\234 \247\242\343\241\253\250\246 \232\240\230 \244\230 \251\254\244\234\256\345\251\234\253\234.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Setup failed to install the %S bootcode on the system partition.",

View file

@ -1928,13 +1928,6 @@ MUI_ERROR enUSErrorEntries[] =
" * Press any key to continue.",
NULL
},
{
// ERROR_DELETE_SPACE,
"You cannot delete unpartitioned disk space!\n"
"\n"
" * Press any key to continue.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Setup failed to install the %S bootcode on the system partition.",

View file

@ -1941,13 +1941,6 @@ MUI_ERROR esESErrorEntries[] =
" * Pulse cualquier tecla para continuar.",
NULL
},
{
// ERROR_DELETE_SPACE,
"\255No se puede eliminar un espacio de disco sin particionar!\n"
"\n"
" * Pulse cualquier tecla para continuar.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"El instalador fall\242 al instalar el c\242digo de arranque %S en la partici\242n del sistema.",

View file

@ -1931,13 +1931,6 @@ MUI_ERROR etEEErrorEntries[] =
" * Vajuta mis tahes klahvi, et j\204tkata.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Partitsioneerimata kettaruumi ei saa kustutada!\n"
"\n"
" * Vajuta mis tahes klahvi, et j\204tkata.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"S\201steemikettale ei \344nnestunud paigaldada %S alglaadimiskoodi.",

View file

@ -1936,13 +1936,6 @@ MUI_ERROR euESErrorEntries[] =
" * Sakatu tekla bat jarraitzeko.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Ez ahal duzu diskoaren ez-partiziotatu ezpazioa ezabatzeko!\n"
"\n"
" * Sakatu tekla bat jarraitzeko.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Instalazioa huts egin du bootcode instalatzeko %S sistemaren partizioan.",

View file

@ -1965,13 +1965,6 @@ MUI_ERROR frFRErrorEntries[] =
" * Appuyer sur une touche pour continuer.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Vous ne pouvez supprimer de l'espace disque non partitionn\202!\n"
"\n"
" * Appuyer sur une touche pour continuer.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Echec de l'installation du code de d\202marrage %S sur la partition syst\212me.",

View file

@ -1931,13 +1931,6 @@ MUI_ERROR heILErrorEntries[] =
".\212\211\231\216\204\214 \211\203\213 \231\227\216 \214\222 \225\207\214 * ",
NULL
},
{
// ERROR_DELETE_SPACE,
"!\204\226\227\205\216 \200\214\231 \227\221\211\203 \207\210\231 \227\205\207\216\214 \217\232\211\220 \200\214\n"
"\n"
".\212\211\231\216\204\214 \211\203\213 \231\227\216 \214\222 \225\207\214 * ",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
".\232\213\230\222\216\204 \232\226\211\207\216 \214\222 %S \230\205\201\222 \214\205\207\232\200 \203\205\227 \232\220\227\232\204\201 \204\231\214\213\220 \204\220\227\232\204\204 \232\211\220\213\232",

View file

@ -1959,13 +1959,6 @@ MUI_ERROR hrHRErrorEntries[] =
" * Pritisnite bilo koju tipku za nastavak.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Ne mo\247ete obriati neparticionirani diskovni prostor!\n"
"\n"
" * Pritisnite bilo koju tipku za nastavak.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Instalacijski program je neuspje\347no instalirao %S bootcode na sistemsku particiju.",

View file

@ -1829,13 +1829,6 @@ MUI_ERROR huHUErrorEntries[] =
" * Nyomjon meg egy gombot a folytat\240shoz.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Nem tud t\224r\224lni particion\240latlan lemezter\201letet!\n"
"\n"
" * Nyomjon meg egy gombot a folytat\240shoz.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Nem siker\201lt a %S bootcode telep\241t\202se a rendszerpart\241ci\242ra.",

View file

@ -1935,13 +1935,6 @@ MUI_ERROR idIDErrorEntries[] =
" * Tekan tombol apapun untuk lanjut.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Anda tidak dapat menghapus ukuran cakram yang belum dipartisi!\n"
"\n"
" * Tekan tombol apapun untuk lanjut.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Penyetelan gagal memasang bootcode %S pada partisi sistem.",

View file

@ -1942,13 +1942,6 @@ MUI_ERROR itITErrorEntries[] =
" * Premere un tasto qualsiasi per continuare.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Non si pu\x95 cancellare spazio in un disco non partizionato!\n"
"\n"
" * Premere un tasto qualsiasi per continuare.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Impossibile installare il bootcode %S nella partizione di sistema.",

View file

@ -1938,13 +1938,6 @@ MUI_ERROR jaJPErrorEntries[] =
" * \277\336\257\272\263 \275\331\306\312 \305\306\266 \267\260\246 \265\274\303 \270\300\336\273\262\241",
NULL
},
{
// ERROR_DELETE_SPACE,
"\320\314\336\335\266\302 \311 \303\336\250\275\270 \275\315\337\260\275 \246 \273\270\274\336\256 \275\331\272\304\312 \303\336\267\317\276\335!\n"
"\n"
" * \277\336\257\272\263 \275\331\306\312 \305\306\266 \267\260\246 \265\274\303 \270\300\336\273\262\241",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"\276\257\304\261\257\314\337\312 \274\275\303\321 \312\337\260\303\250\274\256\335 \274\336\256\263\315\311 %S \314\336\260\304 \332\272\260\304\336 \311 \262\335\275\304\260\331\306 \274\257\312\337\262 \274\317\274\300\241",

View file

@ -1939,13 +1939,6 @@ MUI_ERROR ltLTErrorEntries[] =
" * Press any key to continue.",
NULL
},
{
// ERROR_DELETE_SPACE,
"You cannot delete unpartitioned disk space!\n"
"\n"
" * Press any key to continue.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Setup failed to install the %S bootcode on the system partition.",

View file

@ -1934,13 +1934,6 @@ MUI_ERROR msMYErrorEntries[] =
" * Tekan sebarang kunci untuk meneruskan.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Anda tidak boleh menghapuskan ruang cakera yang tiada partition!\n"
"\n"
" * Tekan sebarang kunci untuk meneruskan.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Persediaan gagal memasang bootcode %S pada partition sistem.",

View file

@ -1957,13 +1957,6 @@ MUI_ERROR nlNLErrorEntries[] =
" * Druk op een willekeurige toets om door te gaan.",
NULL
},
{
// ERROR_DELETE_SPACE,
"U kunt ongebruikte schijfruimte voor partities niet verwijderen!\n"
"\n"
" * Druk op een willekeurige toets om door te gaan.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Setup kan de %S bootcode op de systeempartitie niet installeren.",

View file

@ -1947,13 +1947,6 @@ MUI_ERROR plPLErrorEntries[] =
" * Naci\230nij dowolny klawisz, aby kontynuowa\206.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Nie mo\276na usun\245\206 nieprzydzielonego miejsca, gdzie nie ma \276adnej partycji!\n"
"\n"
" * Naci\230nij dowolny klawisz, aby kontynuowa\206.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Instalator nie m\242g\210 zapisa\206 kodu rozruchowego %S na partycji systemowej.",

View file

@ -1972,13 +1972,6 @@ MUI_ERROR ptBRErrorEntries[] =
" * Pressione qualquer tecla para continuar.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Voc\210 n\306o pode excluir um espa\207o n\306o-particionado!\n"
"\n"
" * Pressione qualquer tecla para continuar.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Erro ao instalar o c\242digo de inicializa\207\306o %S na parti\207\306o do sistema.",

View file

@ -1972,13 +1972,6 @@ MUI_ERROR ptPTErrorEntries[] =
" * Pressione qualquer tecla para continuar.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Pode excluir um espa\207o n\306o particionado!\n"
"\n"
" * Pressione qualquer tecla para continuar.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Erro ao instalar o c\242digo de inicializa\207\306o %S na parti\207\306o do sistema.",

View file

@ -1988,14 +1988,6 @@ MUI_ERROR roROErrorEntries[] =
" * Tasta\376i pentru a continua.",
NULL
},
{
// ERROR_DELETE_SPACE,
"A\376i \356ncercat \272tergerea de spa\376iu neparti\376ionat,\n"
"\356ns\343 doar spa\376iul parti\376ionat poate fi \272ters!\n"
"\n"
" * Tasta\376i pentru a continua.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"E\272ec la instalarea codului %S de ini\376ializare\n"

View file

@ -1958,13 +1958,6 @@ MUI_ERROR ruRUErrorEntries[] =
" * \215\240\246\254\250\342\245 \253\356\241\343\356 \252\253\240\242\250\350\343 \244\253\357 \257\340\256\244\256\253\246\245\255\250\357.",
NULL
},
{
// ERROR_DELETE_SPACE,
"\202\353 \255\245 \254\256\246\245\342\245 \343\244\240\253\250\342\354 \255\245\340\240\247\244\245\253\245\255\255\256\245 \244\250\341\252\256\242\256\245 \257\340\256\341\342\340\240\255\341\342\242\256!\n"
"\n"
" * \215\240\246\254\250\342\245 \253\356\241\343\356 \252\253\240\242\250\350\343 \244\253\357 \257\340\256\244\256\253\246\245\255\250\357.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"\215\245 \343\244\240\253\256\341\354 \343\341\342\240\255\256\242\250\342\354 \247\240\243\340\343\247\347\250\252 %S \255\240 \341\250\341\342\245\254\255\353\251 \340\240\247\244\245\253.",

View file

@ -1946,13 +1946,6 @@ MUI_ERROR skSKErrorEntries[] =
" * Pokra\237ujte stla\237en\241m \226ubovo\226n\202ho kl\240vesu.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Nem\223\247ete odstr\240ni\234 miesto na disku, ktor\202 nie je oblas\234ou!\n"
"\n"
" * Pokra\237ujte stla\237en\241m \226ubovo\226n\202ho kl\240vesu.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"In\347tal\240toru sa nepodarilo nain\347talova\234 %S zav\240dzac\241 k\242d s\243borov\202ho\n"

View file

@ -1941,13 +1941,6 @@ MUI_ERROR sqALErrorEntries[] =
" * Shtypni nj\211 tast \211far\211do p\211r t\211 vazhduar.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Ju nuk mund t\211 fshini hap\211sir\211 n\211 disk jasht particioneve!\n"
"\n"
" * Shtypni nj\211 tast cfar\211do p\211r t\211 vazhduar.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Instalimi d\211shtoj n\211 instalimin e %S bootcode n\211 particionin e sistemit.",

View file

@ -1937,13 +1937,6 @@ MUI_ERROR svSEErrorEntries[] =
" * Tryck valfri tangent f\224r att forts\204tta.",
NULL
},
{
// ERROR_DELETE_SPACE,
"Du kan inte ta bort opartitionerrat diskutrymme!\n"
"\n"
" * Tryck valfri tangent f\224r att forts\204tta.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Setup misslyckades att installera %S bootkoden p\206 systempartitionen.",

View file

@ -1912,13 +1912,6 @@ MUI_ERROR trTRErrorEntries[] =
" * Devam etmek i\207in bir tu\237a bas\215n\215z.",
NULL
},
{
// ERROR_DELETE_SPACE,
"B\224l\201mlenmemi\237 disk alan\215n\215 silemezsiniz!\n"
"\n"
" * Devam etmek i\207in bir tu\237a bas\215n\215z.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"Kur, sistem b\224l\201m\201 \201zerinde %S \224ny\201kleme kodunu kurmada ba\237ar\215s\215z oldu.",

View file

@ -1944,13 +1944,6 @@ MUI_ERROR ukUAErrorEntries[] =
" * \215\240\342\250\341\255i\342\354 \241\343\244\354-\357\252\343 \252\253\240\242i\350\343 \351\256\241 \257\340\256\244\256\242\246\250\342\250.",
NULL
},
{
// ERROR_DELETE_SPACE,
"\215\245 \254\256\246\255\240 \242\250\244\240\253\250\342\250 \255\245\340\256\247\254i\347\245\255\343 \256\241\253\240\341\342\354 \255\240 \244\250\341\252\343!\n"
"\n"
" * \215\240\342\250\341\255i\342\354 \241\343\244\354-\357\252\343 \252\253\240\242i\350\343 \351\256\241 \257\340\256\244\256\242\246\250\342\250.",
NULL
},
{
// ERROR_INSTALL_BOOTCODE,
"\215\245 \242\244\240\253\256\341\354 \242\341\342\240\255\256\242\250\342\250 \247\240\242\240\255\342\240\246\343\242\240\253\354\255\250\251 \252\256\244 %S \255\240 \341\250\342\245\254\255\250\251 \340\256\247\244i\253.",

View file

@ -1726,7 +1726,7 @@ SelectPartitionPage(PINPUT_RECORD Ir)
// return SELECT_PARTITION_PAGE;
}
if (CurrentPartition->IsPartitioned == FALSE)
if (!CurrentPartition->IsPartitioned)
{
Error = PartitionCreationChecks(CurrentPartition);
if (Error != NOT_AN_ERROR)
@ -1789,10 +1789,10 @@ SelectPartitionPage(PINPUT_RECORD Ir)
ASSERT(CurrentPartition != NULL);
if (CurrentPartition->IsPartitioned == FALSE)
/* Ignore deletion in case this is not a partitioned entry */
if (!CurrentPartition->IsPartitioned)
{
MUIDisplayError(ERROR_DELETE_SPACE, Ir, POPUP_WAIT_ANY_KEY);
return SELECT_PARTITION_PAGE;
continue;
}
// TODO: Do something similar before trying to format the partition?