[ext2fs] fix creation of persistent partitions for pre-1703 platforms

* Windows platforms prior to Windows 10 1703 cannot access any logical partition besides the
  first one (we don't even get a volume for those).
* This fix enables the use of physical + offset for ext# formatting to work around this,
  which is file since we don't actually need to mount the partition.
* Also fix ext2fs_open2() not handling normalized versions of Windows drive paths ("\\?\...")
* Also fix an issue where we would make the drive letter unavailable after formatting a
  standalone partition to ext#.
* Also ensure that we return an error if the drive we attempt to locate a partition on
  through an offset does not match the currently selected one.
* Also remove some unused calls in drive.c.
* Closes #1374
This commit is contained in:
Pete Batard 2019-09-14 23:33:46 +01:00
parent 0a24940c85
commit bf8d888b21
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
7 changed files with 89 additions and 83 deletions

View file

@ -1227,7 +1227,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
}
if (SelectedDrive.MediaType != FixedMedia) {
if ((target_type == TT_UEFI) && (partition_type == PARTITION_STYLE_GPT) && (nWindowsBuildNumber < 15000)) {
// Up to Windows 10 Creators Update, we were screwed, since we need access to 2 partitions at the same time.
// Up to Windows 10 Creators Update (1703), we were screwed, since we need access to 2 partitions at the same time.
// Thankfully, the newer Windows allow mounting multiple partitions on the same REMOVABLE drive.
MessageBoxExU(hMainDialog, lmprintf(MSG_198), lmprintf(MSG_190), MB_OK|MB_ICONERROR|MB_IS_RTL, selected_langid);
goto out;