[SETUP] Add support for selecting FS type in unattended setups

By default, we still fallback to FAT if nothing asked, or if there
is an invalid input.
0 is FAT, 1 is BtrFS. This can be grown as soon as we add more IFS.
This commit is contained in:
Pierre Schweitzer 2018-12-28 20:34:48 +01:00
parent c526f94b8c
commit 4ed6b1ffca
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
4 changed files with 41 additions and 9 deletions

View file

@ -196,6 +196,16 @@ CheckUnattendedSetup(
}
}
/* Search for FsType in the 'Unattend' section */
pSetupData->FsType = 0;
if (SpInfFindFirstLine(UnattendInf, L"Unattend", L"FsType", &Context))
{
if (SpInfGetIntField(&Context, 1, &IntValue))
{
pSetupData->FsType = IntValue;
}
}
Quit:
SpInfCloseInfFile(UnattendInf);
}

View file

@ -110,6 +110,7 @@ typedef struct _USETUP_DATA
LONG MBRInstallType;
LONG FormatPartition;
LONG AutoPartition;
LONG FsType;
/* Settings lists *****/
PGENERIC_LIST ComputerList;