whitespace fixes again
authorJérôme Gardou <jerome.gardou@reactos.org>
Wed, 2 Jan 2019 00:44:13 +0000 (01:44 +0100)
committerJérôme Gardou <jerome.gardou@reactos.org>
Wed, 2 Jan 2019 00:44:13 +0000 (01:44 +0100)
ntoskrnl/cache/pinsup.c
ntoskrnl/cache/section/data.c
ntoskrnl/include/internal/mm.h
ntoskrnl/mm/ARM3/miarm.h
ntoskrnl/mm/ARM3/section.c
ntoskrnl/mm/ARM3/sysldr.c
ntoskrnl/mm/section.c

index 0578284..32feb97 100644 (file)
@@ -245,7 +245,7 @@ CcpDereferenceCache(ULONG Start,
 
     if (Immediate)
     {
-       PSECTION ToDeref = Bcb->SectionObject;
+        PSECTION ToDeref = Bcb->SectionObject;
         Bcb->Map = NULL;
         Bcb->SectionObject = NULL;
         Bcb->BaseAddress = NULL;
@@ -308,7 +308,7 @@ on failure.
 /* Needs mutex */
 ULONG
 CcpAllocateCacheSections(PFILE_OBJECT FileObject,
-                                                PSECTION SectionObject)
+                         PSECTION SectionObject)
 {
     ULONG i = INVALID_CACHE;
     PNOCC_CACHE_MAP Map;
index 33b9fdf..bcdbbd0 100644 (file)
@@ -350,7 +350,10 @@ MmCreateCacheSection(PSECTION *SectionObject,
 
     /* Initialize it */
     RtlZeroMemory(Section, sizeof(*Section));
-    Section->u.Flags.filler0 = 1;
+
+    /* Mark it as a "ROS" Section */
+    Section->u.Flags.filler0 = 1
+
     Section->InitialPageProtection = SectionPageProtection;
     Section->u.LongFlags = MiSectionFlagsFromAllocationAttributes(AllocationAttributes);
     Section->Segment = NULL;
index 2997661..466fabd 100644 (file)
@@ -159,26 +159,26 @@ typedef ULONG_PTR SWAPENTRY;
 
 typedef struct _MM_SECTION_SEGMENT
 {
-    FAST_MUTEX Lock;           /* lock which protects the page directory */
-       PFILE_OBJECT FileObject;
-    LARGE_INTEGER RawLength;           /* length of the segment which is part of the mapped file */
-    LARGE_INTEGER Length;                      /* absolute length of the segment */
+    FAST_MUTEX Lock;      /* lock which protects the page directory */
+    PFILE_OBJECT FileObject;
+    LARGE_INTEGER RawLength;      /* length of the segment which is part of the mapped file */
+    LARGE_INTEGER Length;         /* absolute length of the segment */
     ULONG ReferenceCount;
-       ULONG CacheCount;
+    ULONG CacheCount;
     ULONG Protection;
     ULONG Flags;
     BOOLEAN WriteCopy;
-       BOOLEAN Locked;
+    BOOLEAN Locked;
 
-       struct
-       {
-               ULONGLONG FileOffset;           /* start offset into the file for image sections */
-               ULONG_PTR VirtualAddress;       /* start offset into the address range for image sections */
-               ULONG Characteristics;
-       } Image;
+    struct
+    {
+        ULONGLONG FileOffset;      /* start offset into the file for image sections */
+        ULONG_PTR VirtualAddress;   /* start offset into the address range for image sections */
+        ULONG Characteristics;
+    } Image;
 
-       LIST_ENTRY ListOfSegments;
-       RTL_GENERIC_TABLE PageTable;
+    LIST_ENTRY ListOfSegments;
+    RTL_GENERIC_TABLE PageTable;
 } MM_SECTION_SEGMENT, *PMM_SECTION_SEGMENT;
 
 typedef struct _MM_IMAGE_SECTION_OBJECT
@@ -195,15 +195,15 @@ FORCEINLINE
 PFILE_OBJECT
 FILE_OBJECT_FROM_SECTION(PSECTION Section)
 {
-       ASSERT(Section->u.Flags.filler0 == 1);
+   ASSERT(Section->u.Flags.filler0 == 1);
 
-       if (!Section->Segment)
-               return NULL;
+    if (!Section->Segment)
+        return NULL;
 
-       if (Section->u.Flags.Image)
-               return ((PMM_IMAGE_SECTION_OBJECT)Section->Segment)->FileObject;
+    if (Section->u.Flags.Image)
+        return ((PMM_IMAGE_SECTION_OBJECT)Section->Segment)->FileObject;
 
-       return ((PMM_SECTION_SEGMENT)Section->Segment)->FileObject;
+    return ((PMM_SECTION_SEGMENT)Section->Segment)->FileObject;
 }
 
 #define MA_GetStartingAddress(_MemoryArea) ((_MemoryArea)->VadNode.StartingVpn << PAGE_SHIFT)
@@ -1093,9 +1093,9 @@ MmInitGlobalKernelPageDirectory(VOID);
 VOID
 NTAPI
 MmGetPageFileMapping(
-       struct _EPROCESS *Process,
-       PVOID Address,
-       SWAPENTRY* SwapEntry);
+    struct _EPROCESS *Process,
+    PVOID Address,
+    SWAPENTRY* SwapEntry);
 
 VOID
 NTAPI
index bba0be0..52593c0 100644 (file)
@@ -2304,27 +2304,27 @@ FORCEINLINE
 ULONG
 MiSectionFlagsFromAllocationAttributes(ULONG Attributes)
 {
-       union
-       {
-               ULONG LongFlags;
-               MMSECTION_FLAGS Flags;
-       } u;
+    union
+    {
+        ULONG LongFlags;
+        MMSECTION_FLAGS Flags;
+    } u;
 
-       u.LongFlags = 0;
+    u.LongFlags = 0;
 
 #define ATTRIBUTE_TO_FLAG(__a, __f) if (Attributes & __a) u.Flags.__f = 1
-       ATTRIBUTE_TO_FLAG(SEC_IMAGE, Image);
-       ATTRIBUTE_TO_FLAG(SEC_PHYSICALMEMORY, PhysicalMemory);
-       ATTRIBUTE_TO_FLAG(SEC_FILE, File);
-       ATTRIBUTE_TO_FLAG(SEC_NO_CHANGE, NoChange);
-       ATTRIBUTE_TO_FLAG(SEC_BASED, Based);
-       ATTRIBUTE_TO_FLAG(SEC_RESERVE, Reserve);
-       ATTRIBUTE_TO_FLAG(SEC_COMMIT, Commit);
-       ATTRIBUTE_TO_FLAG(SEC_NOCACHE, NoCache);
-       ATTRIBUTE_TO_FLAG(SEC_WRITECOMBINE, WriteCombined);
+    ATTRIBUTE_TO_FLAG(SEC_IMAGE, Image);
+    ATTRIBUTE_TO_FLAG(SEC_PHYSICALMEMORY, PhysicalMemory);
+    ATTRIBUTE_TO_FLAG(SEC_FILE, File);
+    ATTRIBUTE_TO_FLAG(SEC_NO_CHANGE, NoChange);
+    ATTRIBUTE_TO_FLAG(SEC_BASED, Based);
+    ATTRIBUTE_TO_FLAG(SEC_RESERVE, Reserve);
+    ATTRIBUTE_TO_FLAG(SEC_COMMIT, Commit);
+    ATTRIBUTE_TO_FLAG(SEC_NOCACHE, NoCache);
+    ATTRIBUTE_TO_FLAG(SEC_WRITECOMBINE, WriteCombined);
 #undef ATTRIBUTE_TO_FLAG
 
-       return u.LongFlags;
+    return u.LongFlags;
 }
 
 /* EOF */
index 8a8850e..8b81290 100644 (file)
@@ -1805,12 +1805,12 @@ MmGetFileNameForSection(IN PVOID Section,
     PFILE_OBJECT FileObject;
 
     /* Make sure it's an image section */
-       if (((PSECTION)Section)->u.Flags.Image == 0)
-       {
-               /* It's not, fail */
-               DPRINT1("Not an image section\n");
-               return STATUS_SECTION_NOT_IMAGE;
-       }
+    if (((PSECTION)Section)->u.Flags.Image == 0)
+    {
+        /* It's not, fail */
+        DPRINT1("Not an image section\n");
+        return STATUS_SECTION_NOT_IMAGE;
+    }
 
     /* Get the file object */
     FileObject = MmGetFileObjectForSection(Section);
index 1368d81..08ae994 100644 (file)
@@ -87,7 +87,7 @@ MiLoadImageSection(IN OUT PVOID *SectionPtr,
                    IN BOOLEAN SessionLoad,
                    IN PLDR_DATA_TABLE_ENTRY LdrEntry)
 {
-       PSECTION Section = *SectionPtr;
+    PSECTION Section = *SectionPtr;
     NTSTATUS Status;
     PEPROCESS Process;
     PVOID Base = NULL;
index 50aec96..fcb1620 100644 (file)
@@ -62,7 +62,7 @@
 #define MmSetPageEntrySectionSegment(S,O,E) do { \
         DPRINT("SetPageEntrySectionSegment(old,%p,%x,%x)\n",(S),(O)->LowPart,E); \
         _MmSetPageEntrySectionSegment((S),(O),(E),__FILE__,__LINE__);   \
-       } while (0)
+    } while (0)
 
 extern MMSESSION MmSession;
 
@@ -121,7 +121,7 @@ C_ASSERT(PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, Si
 
 typedef struct
 {
-       PSECTION Section;
+    PSECTION Section;
     PMM_SECTION_SEGMENT Segment;
     LARGE_INTEGER Offset;
     BOOLEAN WasDirty;
@@ -2766,7 +2766,7 @@ INIT_FUNCTION
 NTAPI
 MmCreatePhysicalMemorySection(VOID)
 {
-       PSECTION PhysSection;
+    PSECTION PhysSection;
     NTSTATUS Status;
     OBJECT_ATTRIBUTES Obj;
     UNICODE_STRING Name = RTL_CONSTANT_STRING(L"\\Device\\PhysicalMemory");
@@ -4356,7 +4356,7 @@ NtQuerySection(
 
                 if (Section->u.Flags.Image == 0)
                 {
-                       PMM_SECTION_SEGMENT Segment = (PMM_SECTION_SEGMENT)Section->Segment;
+                    PMM_SECTION_SEGMENT Segment = (PMM_SECTION_SEGMENT)Section->Segment;
 
                     Sbi.BaseAddress = (PVOID)Segment->Image.VirtualAddress;
                     Sbi.Size.QuadPart = Segment->Length.QuadPart;
@@ -4364,7 +4364,7 @@ NtQuerySection(
 
                 _SEH2_TRY
                 {
-                       RtlCopyMemory(SectionInformation, &Sbi, sizeof(Sbi));
+                    RtlCopyMemory(SectionInformation, &Sbi, sizeof(Sbi));
 
                     if (ResultLength != NULL)
                     {
@@ -4530,7 +4530,7 @@ MmMapViewOfSection(IN PVOID SectionObject,
                    IN ULONG AllocationType,
                    IN ULONG Protect)
 {
-       PSECTION Section;
+    PSECTION Section;
     PMMSUPPORT AddressSpace;
     ULONG ViewOffset;
     NTSTATUS Status = STATUS_SUCCESS;
@@ -4565,7 +4565,7 @@ MmMapViewOfSection(IN PVOID SectionObject,
     AddressSpace = &Process->Vm;
 
     if (Section->u.Flags.NoChange)
-       AllocationType |= SEC_NO_CHANGE;
+        AllocationType |= SEC_NO_CHANGE;
 
     MmLockAddressSpace(AddressSpace);
 
@@ -4662,7 +4662,7 @@ MmMapViewOfSection(IN PVOID SectionObject,
     }
     else
     {
-       PMM_SECTION_SEGMENT Segment = (PMM_SECTION_SEGMENT)Section->Segment;
+        PMM_SECTION_SEGMENT Segment = (PMM_SECTION_SEGMENT)Section->Segment;
 
         /* check for write access */
         if ((Protect & (PAGE_READWRITE|PAGE_EXECUTE_READWRITE)) &&
@@ -4871,7 +4871,7 @@ MmMapViewInSystemSpace (IN PVOID SectionObject,
                         OUT PVOID * MappedBase,
                         IN OUT PSIZE_T ViewSize)
 {
-       PSECTION Section;
+    PSECTION Section;
     PMM_SECTION_SEGMENT Segment;
     PMMSUPPORT AddressSpace;
     NTSTATUS Status;