Only in C:\reactos\ntoskrnl: .svn
Only in C:\reactos\ntoskrnl: arc_detect_20140815-v2.diff
Only in C:\reactos\ntoskrnl: arc_detect_20140815.diff
Only in C:\reactos\ntoskrnl: cache
Only in C:\reactos\ntoskrnl: cc
Only in C:\reactos\ntoskrnl: CMakeLists.txt
Only in C:\reactos\ntoskrnl: config
Only in C:\reactos\ntoskrnl: dbgk
Only in C:\reactos\ntoskrnl: ex
Only in C:\reactos\ntoskrnl: fsrtl
Only in C:\reactos\ntoskrnl\fstub: .svn
diff -ru C:\reactos\ntoskrnl\fstub\disksup.c C:\reactos\ntoskrnl\fstub\disksup.c
--- C:\reactos\ntoskrnl\fstub\disksup.c	Fri Aug 15 10:33:21 2014
+++ C:\reactos\ntoskrnl\fstub\disksup.c	Fri Aug 15 12:32:03 2014
@@ -1042,8 +1042,16 @@
     ULONGLONG EndingSector;
     PAGED_CODE();
 
+    DPRINT1("FSTUB: entry \n");
+    DPRINT1("type %#x\n", Entry->PartitionType);
+    DPRINT1("offset %#08lx\n", GET_STARTING_SECTOR(Entry));
+    DPRINT1("length %#08lx\n", GET_PARTITION_LENGTH(Entry));
+
     /* Unused partitions are considered valid */
-    if (Entry->PartitionType == PARTITION_ENTRY_UNUSED) return TRUE;
+    if (Entry->PartitionType == PARTITION_ENTRY_UNUSED) {
+        DPRINT1("FSTUB: unused entry \n");
+        return TRUE;
+    }
 
     /* Get the last sector of the partition */
     EndingSector = GET_STARTING_SECTOR(Entry) +  GET_PARTITION_LENGTH(Entry);
@@ -1052,9 +1060,11 @@
     if (EndingSector > MaxSector)
     {
         /* Invalid partition */
-        DPRINT1("FSTUB: entry is invalid\n");
+        DPRINT1("FSTUB: entry is invalid [1]\n");
+        /*
         DPRINT1("FSTUB: offset %#08lx\n", GET_STARTING_SECTOR(Entry));
         DPRINT1("FSTUB: length %#08lx\n", GET_PARTITION_LENGTH(Entry));
+        */
         DPRINT1("FSTUB: end %#I64x\n", EndingSector);
         DPRINT1("FSTUB: max %#I64x\n", MaxSector);
         return FALSE;
@@ -1062,9 +1072,11 @@
     else if(GET_STARTING_SECTOR(Entry) > MaxOffset)
     {
         /* Invalid partition */
-        DPRINT1("FSTUB: entry is invalid\n");
+        DPRINT1("FSTUB: entry is invalid [2]\n");
+        /*
         DPRINT1("FSTUB: offset %#08lx\n", GET_STARTING_SECTOR(Entry));
         DPRINT1("FSTUB: length %#08lx\n", GET_PARTITION_LENGTH(Entry));
+        */
         DPRINT1("FSTUB: end %#I64x\n", EndingSector);
         DPRINT1("FSTUB: maxOffset %#I64x\n", MaxOffset);
         return FALSE;
@@ -1377,7 +1389,7 @@
     PUCHAR Buffer = NULL;
     ULONG BufferSize = 2048, InputSize;
     PDRIVE_LAYOUT_INFORMATION DriveLayoutInfo = NULL;
-    LONG j = -1, i = -1, k;
+    LONG j = -1, i = -1;
     DISK_GEOMETRY DiskGeometry;
     LONGLONG EndSector, MaxSector, StartOffset;
     ULONGLONG MaxOffset;
@@ -1476,7 +1488,10 @@
 
         /* Normalize status code and check for failure */
         if (Status == STATUS_NO_DATA_DETECTED) Status = STATUS_SUCCESS;
-        if (!NT_SUCCESS(Status)) break;
+        if (!NT_SUCCESS(Status)) {
+            DPRINT1("Can't read Part desc, status %#x\n", Status);
+            break;
+        }
 
         /* If we biased for EZ-Drive, unbias now */
         if (IsEzDrive && (Offset.QuadPart == 512)) Offset.QuadPart = 0;
@@ -1507,25 +1522,26 @@
 
         /* Start looping partitions */
         j++;
-        DPRINT("FSTUB: Partition Table %d:\n", j);
-        for (Entry = 1, k = 0; Entry <= 4; Entry++, PartitionDescriptor++)
+        DPRINT1("FSTUB: Partition Table %d:\n", j);
+        for (Entry = 1; Entry <= 4; Entry++, PartitionDescriptor++)
         {
             /* Get the partition type */
             PartitionType = PartitionDescriptor->PartitionType;
 
             /* Print debug messages */
-            DPRINT("Partition Entry %d,%d: type %#x %s\n",
+            DPRINT1("Partition Entry %d,%d: type %#x %s\n",
                     j,
                     Entry,
                     PartitionType,
                     (PartitionDescriptor->ActiveFlag) ? "Active" : "");
-            DPRINT("\tOffset %#08lx for %#08lx Sectors\n",
+            DPRINT1("\tOffset %#08lx for %#08lx Sectors\n",
                     GET_STARTING_SECTOR(PartitionDescriptor),
                     GET_PARTITION_LENGTH(PartitionDescriptor));
 
             /* Check whether we're facing a protective MBR */
             if (PartitionType == EFI_PMBR_OSTYPE_EFI)
             {
+                DPRINT1("FSTUB: EFI_PMBR_OSTYPE_EFI\n");
                 /* Partition length might be bigger than disk size */
                 FstubFixupEfiPartition(PartitionDescriptor,
                                        MaxOffset);
@@ -1536,21 +1552,19 @@
                                             MaxOffset,
                                             MaxSector)) && !(j))
             {
-                /* It's invalid, so fail */
-                IsValid = FALSE;
-                break;
-            }
-
-            /* Check if it's a container */
-            if (IsContainerPartition(PartitionType))
-            {
-                /* Increase the count of containers */
-                if (++k != 1)
-                {
-                    /* More then one table is invalid */
-                    DPRINT1("FSTUB: Multiple container partitions found in "
-                            "partition table %d\n - table is invalid\n",
-                            j);
+                /* It's invalid */
+                if (PartitionType == PARTITION_ENTRY_UNUSED) {
+                    DPRINT1("Skip invalid Part Entry %d,%d\n", j, Entry);
+                    continue;
+                }
+                if (IsContainerPartition(PartitionType)) {
+                    /* Some disk utilities generate wrong partition size for 
+                       Extended Partition, while set correct values inside.
+                       Keep it.
+                     */
+                    DPRINT1("Keep invalid ExtPart Entry %d,%d\n", j, Entry);
+                } else {
+                    DPRINT1("Invalid Part Entry %d,%d\n", j, Entry);
                     IsValid = FALSE;
                     break;
                 }
@@ -1591,6 +1605,7 @@
                                                         TAG_FILE_SYSTEM);
                 if (!DriveLayoutInfo)
                 {
+                    DPRINT1("FSTUB: Out of memory, buff size %#x\n", BufferSize);
                     /* Out of memory, unto this extra structure */
                     --i;
                     Status = STATUS_INSUFFICIENT_RESOURCES;
Only in C:\reactos\ntoskrnl\fstub: fstubex.c
Only in C:\reactos\ntoskrnl\fstub: halstub.c
Only in C:\reactos\ntoskrnl\fstub: translate.c
Only in C:\reactos\ntoskrnl: guid.c
Only in C:\reactos\ntoskrnl: inbv
Only in C:\reactos\ntoskrnl: include
Only in C:\reactos\ntoskrnl\io: .svn
Only in C:\reactos\ntoskrnl\io\iomgr: .svn
Only in C:\reactos\ntoskrnl\io\iomgr: adapter.c
diff -ru C:\reactos\ntoskrnl\io\iomgr\arcname.c C:\reactos\ntoskrnl\io\iomgr\arcname.c
--- C:\reactos\ntoskrnl\io\iomgr\arcname.c	Tue Mar 11 16:58:38 2014
+++ C:\reactos\ntoskrnl\io\iomgr\arcname.c	Fri Aug 15 17:47:04 2014
@@ -43,6 +43,7 @@
 {
     SIZE_T Length;
     NTSTATUS Status;
+    NTSTATUS StatusCD;
     CHAR Buffer[128];
     BOOLEAN SingleDisk;
     BOOLEAN FoundBoot = FALSE;
@@ -138,9 +139,12 @@
     /* Loop every disk and try to find boot disk */
     Status = IopCreateArcNamesDisk(LoaderBlock, SingleDisk, &FoundBoot);
     /* If it succeed but we didn't find boot device, try to browse Cds */
-    if (NT_SUCCESS(Status) && !FoundBoot)
+    if(!FoundBoot)
     {
-        Status = IopCreateArcNamesCd(LoaderBlock);
+        StatusCD = IopCreateArcNamesCd(LoaderBlock);
+        if(NT_SUCCESS(StatusCD)) {
+            Status = StatusCD;
+        }
     }
 
     /* Return success */
@@ -191,6 +195,7 @@
                                               &EnabledDisks);
     if (!NT_SUCCESS(Status))
     {
+        DPRINT1("GUID_DEVINTERFACE_CDROM failed, status %#x\n", Status);
         NotEnabledPresent = TRUE;
     }
     /* Save symbolic link list address in order to free it after */
@@ -207,6 +212,7 @@
                                              ARC_DISK_SIGNATURE,
                                              ListEntry);
 
+        DPRINT1("CD check sig %s vs %s\n", LoaderBlock->ArcBootDeviceName, ArcDiskSignature->ArcName);
         if (strcmp(LoaderBlock->ArcBootDeviceName, ArcDiskSignature->ArcName) == 0)
         {
             break;
@@ -218,7 +224,7 @@
     /* Not found... Not booting from a Cd */
     if (!ArcDiskSignature)
     {
-        DPRINT("Failed finding a cd that could match current boot device\n");
+        DPRINT1("Failed finding a CD that could match current boot device\n");
         goto Cleanup;
     }
 
@@ -226,7 +232,7 @@
     PartitionBuffer = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 2048, TAG_IO);
     if (!PartitionBuffer)
     {
-        DPRINT("Failed allocating resources!\n");
+        DPRINT1("Failed allocating resources 2k!\n");
         /* Here, we fail, BUT we return success, some Microsoft joke */
         goto Cleanup;
     }
@@ -246,12 +252,14 @@
     /* Finally, if in spite of all that work, we still don't have Cds, leave */
     if (!CdRomCount)
     {
+        DPRINT1("!CdRomCount\n");
         goto Cleanup;
     }
 
     /* Start browsing Cds */
     for (DiskNumber = 0, EnabledDisks = 0; DiskNumber < CdRomCount; DiskNumber++)
     {
+        DPRINT1("Try CD %d\n", DiskNumber);
         /* Check if we have an enabled disk */
         if (SymbolicLinkList && *SymbolicLinkList != UNICODE_NULL)
         {
@@ -268,7 +276,8 @@
             /* Failure? Good bye! */
             if (!NT_SUCCESS(Status))
             {
-                goto Cleanup;
+                DPRINT1("CD symlink access failed: status %#x\n", Status);
+                continue;
             }
 
             /* Now, we'll ask the device its device number */
@@ -332,8 +341,9 @@
                                               &DeviceObject);
             if (!NT_SUCCESS(Status))
             {
+                DPRINT1("CD access failed: status %#x\n", Status);
                 RtlFreeUnicodeString(&DeviceStringW);
-                goto Cleanup;
+                continue;
             }
         }
 
@@ -383,7 +393,7 @@
                 /* Create symbolic link */
                 IoAssignArcName(&ArcNameStringW, &DeviceStringW);
                 RtlFreeUnicodeString(&ArcNameStringW);
-                DPRINT1("Boot device found\n");
+                DPRINT1("Boot CD device found\n");
             }
 
             /* And quit, whatever happens */
@@ -396,6 +406,7 @@
     }
 
 Cleanup:
+    DPRINT1("IopCreateArcNamesCd: status %#x\n", Status);
     if (PartitionBuffer)
     {
         ExFreePoolWithTag(PartitionBuffer, TAG_IO);
@@ -482,6 +493,7 @@
     for (DiskNumber = 0; DiskNumber < DiskCount; DiskNumber++)
     {
         /* Check if we have an enabled disk */
+        DPRINT1("Try DISK %d\n", DiskNumber);
         if (lSymbolicLinkList && *lSymbolicLinkList != UNICODE_NULL)
         {
             /* Create its device name using first symbolic link */
@@ -526,9 +538,12 @@
                 /* If we didn't get the appriopriate data, just skip that disk */
                 if (!NT_SUCCESS(Status))
                 {
-                   ObDereferenceObject(FileObject);
-                   continue;
+                    DPRINT1("Can't get device number, status %#x\n", Status);
+                    ObDereferenceObject(FileObject);
+                    continue;
                 }
+            } else {
+                DPRINT1("Can't get DO, status %#x\n", Status);
             }
 
             /* End of enabled disks enumeration */
@@ -558,6 +573,7 @@
             Status = RtlAnsiStringToUnicodeString(&DeviceStringW, &DeviceStringA, TRUE);
             if (!NT_SUCCESS(Status))
             {
+                DPRINT1("Can't create disk path, status %#x\n", Status);
                 goto Cleanup;
             }
 
@@ -575,6 +591,7 @@
         /* Something failed somewhere earlier, just skip the disk */
         if (!NT_SUCCESS(Status))
         {
+            DPRINT1("DIsk access error, status %#x\n", Status);
             continue;
         }
 
@@ -734,11 +751,14 @@
                 for (i = 1; i <= DriveLayout->PartitionCount; i++)
                 {
                     /* Create device name */
+                    DPRINT1("Try create \\Device\\Harddisk%lu\\Partition%lu\n",
+                        (DeviceNumber.DeviceNumber != ULONG_MAX) ? DeviceNumber.DeviceNumber : DiskNumber, i);
                     sprintf(Buffer, "\\Device\\Harddisk%lu\\Partition%lu", (DeviceNumber.DeviceNumber != ULONG_MAX) ? DeviceNumber.DeviceNumber : DiskNumber, i);
                     RtlInitAnsiString(&DeviceStringA, Buffer);
                     Status = RtlAnsiStringToUnicodeString(&DeviceStringW, &DeviceStringA, TRUE);
                     if (!NT_SUCCESS(Status))
                     {
+                        DPRINT1("Can't create, status %#x\n", Status);
                         goto Cleanup;
                     }
 
@@ -749,7 +769,7 @@
                     /* Is that boot device? */
                     if (RtlEqualString(&ArcNameStringA, &ArcBootString, TRUE))
                     {
-                        DPRINT("Found boot device\n");
+                        DPRINT1("Found HDD boot device\n");
                         *FoundBoot = TRUE;
                     }
 
@@ -761,6 +781,7 @@
                         Status = RtlAnsiStringToUnicodeString(&HalPathStringW, &HalPathStringA, TRUE);
                         if (!NT_SUCCESS(Status))
                         {
+                            DPRINT1("Can't create HAT path, status %#x\n", Status);
                             RtlFreeUnicodeString(&DeviceStringW);
                             goto Cleanup;
                         }
@@ -776,6 +797,7 @@
                     Status = RtlAnsiStringToUnicodeString(&ArcNameStringW, &ArcNameStringA, TRUE);
                     if (!NT_SUCCESS(Status))
                     {
+                        DPRINT1("Can't create Arc path, status %#x\n", Status);
                         RtlFreeUnicodeString(&DeviceStringW);
                         goto Cleanup;
                     }
@@ -813,6 +835,7 @@
     Status = STATUS_SUCCESS;
 
 Cleanup:
+    DPRINT1("IopCreateArcNamesDisk: status %#x\n", Status);
     if (SymbolicLinkList)
     {
         ExFreePool(SymbolicLinkList);
Only in C:\reactos\ntoskrnl\io\iomgr: bootlog.c
Only in C:\reactos\ntoskrnl\io\iomgr: controller.c
Only in C:\reactos\ntoskrnl\io\iomgr: device.c
Only in C:\reactos\ntoskrnl\io\iomgr: deviface.c
Only in C:\reactos\ntoskrnl\io\iomgr: driver.c
Only in C:\reactos\ntoskrnl\io\iomgr: error.c
Only in C:\reactos\ntoskrnl\io\iomgr: file.c
Only in C:\reactos\ntoskrnl\io\iomgr: iocomp.c
Only in C:\reactos\ntoskrnl\io\iomgr: ioevent.c
Only in C:\reactos\ntoskrnl\io\iomgr: iofunc.c
Only in C:\reactos\ntoskrnl\io\iomgr: iomdl.c
Only in C:\reactos\ntoskrnl\io\iomgr: iomgr.c
Only in C:\reactos\ntoskrnl\io\iomgr: iorsrce.c
Only in C:\reactos\ntoskrnl\io\iomgr: iotimer.c
Only in C:\reactos\ntoskrnl\io\iomgr: iowork.c
Only in C:\reactos\ntoskrnl\io\iomgr: irp.c
Only in C:\reactos\ntoskrnl\io\iomgr: irq.c
Only in C:\reactos\ntoskrnl\io\iomgr: ramdisk.c
Only in C:\reactos\ntoskrnl\io\iomgr: rawfs.c
Only in C:\reactos\ntoskrnl\io\iomgr: remlock.c
Only in C:\reactos\ntoskrnl\io\iomgr: symlink.c
Only in C:\reactos\ntoskrnl\io\iomgr: util.c
Only in C:\reactos\ntoskrnl\io\iomgr: volume.c
Only in C:\reactos\ntoskrnl\io: pnpmgr
Only in C:\reactos\ntoskrnl: kd
Only in C:\reactos\ntoskrnl: kd64
Only in C:\reactos\ntoskrnl: kdbg
Only in C:\reactos\ntoskrnl: ke
Only in C:\reactos\ntoskrnl: KrnlFun.c
Only in C:\reactos\ntoskrnl: lpc
Only in C:\reactos\ntoskrnl: mm
Only in C:\reactos\ntoskrnl: ntdll.S
Only in C:\reactos\ntoskrnl: ntkrnlmp
Only in C:\reactos\ntoskrnl: ntos.cmake
Only in C:\reactos\ntoskrnl: ntoskrnl.rc
Only in C:\reactos\ntoskrnl: ntoskrnl.spec
Only in C:\reactos\ntoskrnl: ob
Only in C:\reactos\ntoskrnl: po
Only in C:\reactos\ntoskrnl: ps
Only in C:\reactos\ntoskrnl: rtl
Only in C:\reactos\ntoskrnl: se
Only in C:\reactos\ntoskrnl: sysfuncs.lst
Only in C:\reactos\ntoskrnl: tests
Only in C:\reactos\ntoskrnl: vdm
Only in C:\reactos\ntoskrnl: vf
Only in C:\reactos\ntoskrnl: wmi
