[USETUP]
authorEric Kohl <eric.kohl@reactos.org>
Mon, 29 Dec 2014 21:23:30 +0000 (21:23 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Mon, 29 Dec 2014 21:23:30 +0000 (21:23 +0000)
Change the partition creation workflow, so that the user is forced to choose a file system type and format a partition after it has been created.

svn path=/trunk/; revision=65899

reactos/base/setup/usetup/interface/usetup.c
reactos/base/setup/usetup/partlist.c

index b468ed8..16e7388 100644 (file)
@@ -1618,7 +1618,7 @@ SelectPartitionPage(PINPUT_RECORD Ir)
 
             DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
 
-            return SELECT_FILE_SYSTEM_PAGE;
+            return INSTALL_DIRECTORY_PAGE;
         }
         else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'P')  /* P */
         {
@@ -1969,7 +1969,7 @@ CreatePrimaryPartitionPage(PINPUT_RECORD Ir)
                 return QUIT_PAGE;
             }
 
-            return SELECT_PARTITION_PAGE;
+            return SELECT_FILE_SYSTEM_PAGE;
         }
     }
 
@@ -2279,7 +2279,7 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir)
                 return QUIT_PAGE;
             }
 
-            return SELECT_PARTITION_PAGE;
+            return SELECT_FILE_SYSTEM_PAGE;
         }
     }
 
@@ -2868,7 +2868,11 @@ FormatPartitionPage(PINPUT_RECORD Ir)
 
             DestroyFileSystemList(FileSystemList);
             FileSystemList = NULL;
-            return INSTALL_DIRECTORY_PAGE;
+
+            if (IsUnattendedSetup)
+                return INSTALL_DIRECTORY_PAGE;
+            else
+                return SELECT_PARTITION_PAGE;
         }
     }
 
index 5bb0447..f111d8a 100644 (file)
@@ -2426,6 +2426,8 @@ DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart);
 
         PartEntry->StartSector.QuadPart = NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart;
         PartEntry->SectorCount.QuadPart -= (PartEntry->StartSector.QuadPart - NewPartEntry->StartSector.QuadPart);
+
+        List->CurrentPartition = NewPartEntry;
     }
 
     UpdateDiskLayout(DiskEntry);
@@ -2568,6 +2570,8 @@ DPRINT1("Add new partition entry\n");
 DPRINT1("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart);
 DPRINT1("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1);
 DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart);
+
+        List->CurrentPartition = NewPartEntry;
     }
 
     AddLogicalDiskSpace(DiskEntry);