diff --git a/reactos/base/setup/usetup/interface/usetup.c b/reactos/base/setup/usetup/interface/usetup.c index 75d721d3ab8..6079581ebdf 100644 --- a/reactos/base/setup/usetup/interface/usetup.c +++ b/reactos/base/setup/usetup/interface/usetup.c @@ -1387,10 +1387,10 @@ SelectPartitionPage(PINPUT_RECORD Ir) if (IsUnattendedSetup) { - SelectPartition(PartitionList, - UnattendDestinationDiskNumber, - UnattendDestinationPartitionNumber); - return(SELECT_FILE_SYSTEM_PAGE); + if (SelectPartition(PartitionList, UnattendDestinationDiskNumber, UnattendDestinationPartitionNumber)) + { + return(SELECT_FILE_SYSTEM_PAGE); + } } while(TRUE) diff --git a/reactos/base/setup/usetup/partlist.c b/reactos/base/setup/usetup/partlist.c index 25271bee7dd..907984479a0 100644 --- a/reactos/base/setup/usetup/partlist.c +++ b/reactos/base/setup/usetup/partlist.c @@ -1543,7 +1543,7 @@ DrawPartitionList (PPARTLIST List) } -VOID +DWORD SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber) { PDISKENTRY DiskEntry; @@ -1554,7 +1554,7 @@ SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber) /* Check for empty disks */ if (IsListEmpty (&List->DiskListHead)) - return; + return FALSE; /* Check for first usable entry on next disk */ Entry1 = List->CurrentDisk->ListEntry.Flink; @@ -1575,16 +1575,17 @@ SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber) { List->CurrentDisk = DiskEntry; List->CurrentPartition = PartEntry; - DrawPartitionList (List); - return; + DrawPartitionList (List); + return TRUE; } } Entry2 = Entry2->Flink; } - return; + return FALSE; } Entry1 = Entry1->Flink; } + return FALSE; } diff --git a/reactos/base/setup/usetup/partlist.h b/reactos/base/setup/usetup/partlist.h index 403c79cac43..72fbe6cc8bc 100644 --- a/reactos/base/setup/usetup/partlist.h +++ b/reactos/base/setup/usetup/partlist.h @@ -188,7 +188,7 @@ DestroyPartitionList (PPARTLIST List); VOID DrawPartitionList (PPARTLIST List); -VOID +DWORD SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber); BOOL