Author: hbelusca
Date: Mon Feb 29 20:58:32 2016
New Revision: 70820
URL:
http://svn.reactos.org/svn/reactos?rev=70820&view=rev
Log:
[USETUP]
- Formatting fixes only.
[DISKPART]
- Fix a confusion CylinderAlignment vs. SectorAlignment.
- Formatting fixes.
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/partlist.c
trunk/reactos/base/system/diskpart/partlist.c
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Mon Feb 29 20:58:32
2016
@@ -572,9 +572,9 @@
}
/* search for LocaleID in the 'Unattend' section*/
- if (SetupFindFirstLineW (UnattendInf, L"Unattend", L"LocaleID",
&Context))
- {
- if (INF_GetData (&Context, NULL, &Value))
+ if (SetupFindFirstLineW(UnattendInf, L"Unattend", L"LocaleID",
&Context))
+ {
+ if (INF_GetData(&Context, NULL, &Value))
{
LONG Id = wcstol(Value, NULL, 16);
swprintf(LocaleID,L"%08lx", Id);
@@ -666,7 +666,7 @@
xScreen - 3,
yScreen - 3);
- ScrollToPositionGenericList (LanguageList, GetDefaultLanguageIndex());
+ ScrollToPositionGenericList(LanguageList, GetDefaultLanguageIndex());
MUIDisplayPage(LANGUAGE_PAGE);
@@ -677,7 +677,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN)) /* DOWN */
{
- ScrollDownGenericList (LanguageList);
+ ScrollDownGenericList(LanguageList);
RefreshPage = TRUE;
}
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
@@ -1327,7 +1327,7 @@
ScrollUpGenericList(GenericList);
}
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
- (Ir->Event.KeyEvent.wVirtualKeyCode == VK_NEXT)) /* PAGE DOWN */
+ (Ir->Event.KeyEvent.wVirtualKeyCode == VK_NEXT)) /* PAGE DOWN */
{
ScrollPageDownGenericList(GenericList);
}
@@ -1337,7 +1337,7 @@
ScrollPageUpGenericList(GenericList);
}
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
- (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
+ (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
if (ConfirmQuit(Ir) == TRUE)
return QUIT_PAGE;
@@ -1530,7 +1530,7 @@
/* FIXME: show an error dialog */
return QUIT_PAGE;
}
- else if (IsListEmpty (&PartitionList->DiskListHead))
+ else if (IsListEmpty(&PartitionList->DiskListHead))
{
MUIDisplayError(ERROR_NO_HDD, Ir, POPUP_WAIT_ENTER);
return QUIT_PAGE;
@@ -1966,10 +1966,8 @@
if (Quit == TRUE)
{
- if (ConfirmQuit (Ir) == TRUE)
- {
+ if (ConfirmQuit(Ir) == TRUE)
return QUIT_PAGE;
- }
}
else if (Cancel == TRUE)
{
@@ -2123,10 +2121,8 @@
if (Quit == TRUE)
{
- if (ConfirmQuit (Ir) == TRUE)
- {
+ if (ConfirmQuit(Ir) == TRUE)
return QUIT_PAGE;
- }
}
else if (Cancel == TRUE)
{
@@ -2279,10 +2275,8 @@
if (Quit == TRUE)
{
- if (ConfirmQuit (Ir) == TRUE)
- {
+ if (ConfirmQuit(Ir) == TRUE)
return QUIT_PAGE;
- }
}
else if (Cancel == TRUE)
{
@@ -2357,9 +2351,7 @@
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
if (ConfirmQuit(Ir) == TRUE)
- {
return QUIT_PAGE;
- }
break;
}
@@ -2502,9 +2494,7 @@
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
if (ConfirmQuit(Ir) == TRUE)
- {
return QUIT_PAGE;
- }
break;
}
@@ -2801,9 +2791,7 @@
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
if (ConfirmQuit(Ir) == TRUE)
- {
return QUIT_PAGE;
- }
break;
}
@@ -2896,9 +2884,7 @@
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
if (ConfirmQuit(Ir) == TRUE)
- {
return QUIT_PAGE;
- }
break;
}
@@ -2973,6 +2959,7 @@
#endif
else if (!PartEntry->FileSystem->FormatFunc)
{
+ /* FIXME: show an error dialog */
return QUIT_PAGE;
}
@@ -3708,11 +3695,12 @@
if (SetupFileQueue == NULL)
{
MUIDisplayError(ERROR_COPY_QUEUE, Ir, POPUP_WAIT_ENTER);
- return(QUIT_PAGE);
+ return QUIT_PAGE;
}
if (!PrepareCopyPageInfFile(SetupInf, NULL, Ir))
{
+ /* FIXME: show an error dialog */
return QUIT_PAGE;
}
@@ -3775,6 +3763,7 @@
if (!PrepareCopyPageInfFile(InfHandle, KeyValue, Ir))
{
+ /* FIXME: show an error dialog */
return QUIT_PAGE;
}
#endif
@@ -4008,20 +3997,20 @@
do
{
- INF_GetDataField (&InfContext, 0, &Action);
- INF_GetDataField (&InfContext, 1, &File);
- INF_GetDataField (&InfContext, 2, &Section);
+ INF_GetDataField(&InfContext, 0, &Action);
+ INF_GetDataField(&InfContext, 1, &File);
+ INF_GetDataField(&InfContext, 2, &Section);
DPRINT("Action: %S File: %S Section %S\n", Action, File, Section);
if (Action == NULL)
break; // Hackfix
- if (!_wcsicmp (Action, L"AddReg"))
+ if (!_wcsicmp(Action, L"AddReg"))
{
Delete = FALSE;
}
- else if (!_wcsicmp (Action, L"DelReg"))
+ else if (!_wcsicmp(Action, L"DelReg"))
{
Delete = TRUE;
}
@@ -4420,7 +4409,7 @@
Status = InstallMbrBootCodeToDisk(SourceMbrPathBuffer,
DestinationDevicePathBuffer);
- if (!NT_SUCCESS (Status))
+ if (!NT_SUCCESS(Status))
{
DPRINT1("InstallMbrBootCodeToDisk() failed (Status %lx)\n",
Status);
@@ -4452,14 +4441,14 @@
/* Destroy partition list */
if (PartitionList != NULL)
{
- DestroyPartitionList (PartitionList);
+ DestroyPartitionList(PartitionList);
PartitionList = NULL;
}
/* Destroy filesystem list */
if (FileSystemList != NULL)
{
- DestroyFileSystemList (FileSystemList);
+ DestroyFileSystemList(FileSystemList);
FileSystemList = NULL;
}
Modified: trunk/reactos/base/setup/usetup/partlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Mon Feb 29 20:58:32 2016
@@ -484,7 +484,7 @@
ULONG i;
if (ValueType != REG_FULL_RESOURCE_DESCRIPTOR ||
- ValueLength < sizeof (CM_FULL_RESOURCE_DESCRIPTOR))
+ ValueLength < sizeof(CM_FULL_RESOURCE_DESCRIPTOR))
return STATUS_UNSUCCESSFUL;
FullResourceDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)ValueData;
@@ -502,7 +502,8 @@
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize
% sizeof(CM_INT13_DRIVE_PARAMETER) != 0)
continue;
- *Int13Drives = (CM_INT13_DRIVE_PARAMETER*) RtlAllocateHeap(ProcessHeap, 0,
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
+ *Int13Drives = (CM_INT13_DRIVE_PARAMETER*)RtlAllocateHeap(ProcessHeap, 0,
+
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
if (*Int13Drives == NULL)
return STATUS_NO_MEMORY;
@@ -598,7 +599,7 @@
DiskCount = 0;
while (1)
{
- BiosDiskEntry = (BIOSDISKENTRY*) RtlAllocateHeap(ProcessHeap,
HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
+ BiosDiskEntry = (BIOSDISKENTRY*)RtlAllocateHeap(ProcessHeap,
HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
if (BiosDiskEntry == NULL)
{
break;
@@ -1181,9 +1182,7 @@
NULL);
if (!NT_SUCCESS(Status))
{
- RtlFreeHeap(ProcessHeap,
- 0,
- Mbr);
+ RtlFreeHeap(ProcessHeap, 0, Mbr);
DPRINT1("NtReadFile failed, status=%x\n", Status);
return;
}
@@ -1220,12 +1219,10 @@
DiskEntry->NoMbr = FALSE;
/* Free Mbr sector buffer */
- RtlFreeHeap(ProcessHeap,
- 0,
- Mbr);
+ RtlFreeHeap(ProcessHeap, 0, Mbr);
ListEntry = List->BiosDiskListHead.Flink;
- while(ListEntry != &List->BiosDiskListHead)
+ while (ListEntry != &List->BiosDiskListHead)
{
BiosDiskEntry = CONTAINING_RECORD(ListEntry, BIOSDISKENTRY, ListEntry);
/* FIXME:
@@ -1383,18 +1380,12 @@
{
for (i = 0; i < 4; i++)
{
- AddPartitionToDisk(DiskNumber,
- DiskEntry,
- i,
- FALSE);
+ AddPartitionToDisk(DiskNumber, DiskEntry, i, FALSE);
}
for (i = 4; i < DiskEntry->LayoutBuffer->PartitionCount; i += 4)
{
- AddPartitionToDisk(DiskNumber,
- DiskEntry,
- i,
- TRUE);
+ AddPartitionToDisk(DiskNumber, DiskEntry, i, TRUE);
}
}
@@ -1481,9 +1472,7 @@
FILE_SYNCHRONOUS_IO_NONALERT);
if (NT_SUCCESS(Status))
{
- AddDiskToList(FileHandle,
- DiskNumber,
- List);
+ AddDiskToList(FileHandle, DiskNumber, List);
NtClose(FileHandle);
}
@@ -1566,8 +1555,8 @@
RtlFreeHeap(ProcessHeap, 0, DiskEntry);
}
- /* release the bios disk info */
- while(!IsListEmpty(&List->BiosDiskListHead))
+ /* Release the bios disk info */
+ while (!IsListEmpty(&List->BiosDiskListHead))
{
Entry = RemoveHeadList(&List->BiosDiskListHead);
BiosDiskEntry = CONTAINING_RECORD(Entry, BIOSDISKENTRY, ListEntry);
@@ -1861,7 +1850,7 @@
/* Print separator line */
PrintEmptyLine(List);
- /* Print partition lines*/
+ /* Print partition lines */
PrimaryEntry = DiskEntry->PrimaryPartListHead.Flink;
while (PrimaryEntry != &DiskEntry->PrimaryPartListHead)
{
@@ -3053,11 +3042,8 @@
/* Adjust unpartitioned disk space entries */
/* Get pointer to previous and next unpartitioned entries */
- PrevPartEntry = GetPrevUnpartitionedEntry(DiskEntry,
- PartEntry);
-
- NextPartEntry = GetNextUnpartitionedEntry(DiskEntry,
- PartEntry);
+ PrevPartEntry = GetPrevUnpartitionedEntry(DiskEntry, PartEntry);
+ NextPartEntry = GetNextUnpartitionedEntry(DiskEntry, PartEntry);
if (PrevPartEntry != NULL && NextPartEntry != NULL)
{
Modified: trunk/reactos/base/system/diskpart/partlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/partl…
==============================================================================
--- trunk/reactos/base/system/diskpart/partlist.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/partlist.c [iso-8859-1] Mon Feb 29 20:58:32 2016
@@ -604,7 +604,7 @@
{
LastUnusedSectorCount = AlignDown(DiskEntry->SectorCount.QuadPart -
(LastStartSector + LastSectorCount), DiskEntry->SectorAlignment);
- if (LastUnusedSectorCount >= (ULONGLONG)DiskEntry->CylinderAlignment)
+ if (LastUnusedSectorCount >= (ULONGLONG)DiskEntry->SectorAlignment)
{
DPRINT1("Unpartitioned disk space: %I64u sectors\n",
LastUnusedSectorCount);
@@ -1036,18 +1036,12 @@
{
for (i = 0; i < 4; i++)
{
- AddPartitionToDisk(DiskNumber,
- DiskEntry,
- i,
- FALSE);
+ AddPartitionToDisk(DiskNumber, DiskEntry, i, FALSE);
}
for (i = 4; i < DiskEntry->LayoutBuffer->PartitionCount; i += 4)
{
- AddPartitionToDisk(DiskNumber,
- DiskEntry,
- i,
- TRUE);
+ AddPartitionToDisk(DiskNumber, DiskEntry, i, TRUE);
}
}
@@ -1114,8 +1108,7 @@
FILE_SYNCHRONOUS_IO_NONALERT);
if (NT_SUCCESS(Status))
{
- AddDiskToList(FileHandle,
- DiskNumber);
+ AddDiskToList(FileHandle, DiskNumber);
NtClose(FileHandle);
}
@@ -1177,7 +1170,7 @@
}
/* Release the bios disk info */
- while(!IsListEmpty(&BiosDiskListHead))
+ while (!IsListEmpty(&BiosDiskListHead))
{
Entry = RemoveHeadList(&BiosDiskListHead);
BiosDiskEntry = CONTAINING_RECORD(Entry, BIOSDISKENTRY, ListEntry);