https://git.reactos.org/?p=reactos.git;a=commitdiff;h=453e42beb503ca70e93d4…
commit 453e42beb503ca70e93d4854bc15a2b14850425e
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Mon Dec 25 11:22:00 2017 +0100
[FASTFAT] Revert bd1e7bf: our VPB swapout implementation in FastFAT is buggy and
leaves volumes in half-(dis)mounted state and thus they get remounted while not
completely dismounted.
This can lead to major breakage and data corruption.
This requires deeper fixes (let's just drop that driver!).
CORE-14124
CORE-14126
CORE-14133
---
drivers/filesystems/fastfat/vfat.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/fastfat/vfat.h
index 50b83b1afb..b84b320573 100644
--- a/drivers/filesystems/fastfat/vfat.h
+++ b/drivers/filesystems/fastfat/vfat.h
@@ -13,7 +13,11 @@
#endif
#define USE_ROS_CC_AND_FS
+#if 0
+#ifndef _MSC_VER
#define ENABLE_SWAPOUT
+#endif
+#endif
#define ROUND_DOWN(n, align) \
(((ULONG)n) & ~((align) - 1l))
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fc5a61d8b76a0b3eca172…
commit fc5a61d8b76a0b3eca172f6de9497d91ead47397
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Mon Dec 25 11:20:15 2017 +0100
[NTOSKRNL] Revert 4ef0887: experiments show that our FastFAT is not ready yet to live on its own.
So, bring back the infamous IopParseDevice() hack. Dismounting is to be fixed in FastFAT.
Even though it might not be the last remaining bug...
CORE-14124
CORE-14126
CORE-14133
---
ntoskrnl/io/iomgr/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c
index 11ad0529b3..71863ccb42 100644
--- a/ntoskrnl/io/iomgr/file.c
+++ b/ntoskrnl/io/iomgr/file.c
@@ -533,7 +533,7 @@ IopParseDevice(IN PVOID ParseObject,
/* Check if we can simply use a dummy file */
UseDummyFile = ((OpenPacket->QueryOnly) || (OpenPacket->DeleteOnly));
-#if 0
+#if 1
/* FIXME: Small hack still exists, have to check why...
* This is triggered multiple times by usetup and then once per boot.
*/
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c5db5399dc0864b51d3b7…
commit c5db5399dc0864b51d3b761eaadd9d8bb640e181
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Mon Dec 25 00:12:45 2017 +0200
[USER32] Implement the index -1 for GetWindowLong which returns a pointer to WW
We don't have this struct but WND already contains the same fields in the right
order so we can just return the pointer to the first one.
The meaning of the -1 index was found here: http://www.geoffchappell.com/studies/windows/win32/user32/structs/wnd/index…
---
win32ss/include/ntuser.h | 6 ++++++
win32ss/user/user32/windows/class.c | 9 +++++++++
2 files changed, 15 insertions(+)
diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h
index 5482ac690f..0195b08d8d 100644
--- a/win32ss/include/ntuser.h
+++ b/win32ss/include/ntuser.h
@@ -657,6 +657,11 @@ typedef struct _SBINFOEX
typedef struct _WND
{
THRDESKHEAD head;
+#if 0
+ WW ww;
+#else
+ /* These fields should be moved in the WW at some point. */
+ /* Plese do not change them to keep the same layout with WW. */
DWORD state;
DWORD state2;
/* Extended style. */
@@ -666,6 +671,7 @@ typedef struct _WND
/* Handle of the module that created the window. */
HINSTANCE hModule;
DWORD fnid;
+#endif
struct _WND *spwndNext;
struct _WND *spwndPrev;
struct _WND *spwndParent;
diff --git a/win32ss/user/user32/windows/class.c b/win32ss/user/user32/windows/class.c
index c0ad6a65d3..f12788fd22 100644
--- a/win32ss/user/user32/windows/class.c
+++ b/win32ss/user/user32/windows/class.c
@@ -1116,6 +1116,15 @@ LONG_PTR IntGetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicode )
case GWL_EXSTYLE: retvalue = wndPtr->ExStyle; break;
case GWLP_ID: retvalue = wndPtr->IDMenu; break;
case GWLP_HINSTANCE: retvalue = (ULONG_PTR)wndPtr->hModule; break;
+#if 0
+ /* -1 is an undocumented case which returns WW* */
+ /* source: http://www.geoffchappell.com/studies/windows/win32/user32/structs/wnd/index…
+ case -1: retvalue = (ULONG_PTR)&wndPtr->ww; break;
+#else
+ /* We don't have a WW but WND already contains the same fields in the right order, */
+ /* so we can return a pointer to its first field */
+ case -1: retvalue = (ULONG_PTR)&wndPtr->state; break;
+#endif
case GWLP_WNDPROC:
{
if (!TestWindowProcess(wndPtr))
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9b461bde95804f3dcf14…
commit b9b461bde95804f3dcf1455a1bfbf25cfdb8aedc
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Dec 24 21:54:09 2017 +0100
[DISK] Properly implement querying partition information for partition 0.
In spite of what was implemented in our NT DDK sample, this is a legit operation.
This may have been turned legit starting NT5 (reminder, our implementation is
NT4 based...). So, in this situation, just return the information about the whole
disk (and not a random size) and also, mark everything with default values.
See disk_new for an example of how it works in NT5+.
CORE-14124
---
drivers/storage/class/disk/disk.c | 71 ++++++++++++++++++++++-----------------
1 file changed, 41 insertions(+), 30 deletions(-)
diff --git a/drivers/storage/class/disk/disk.c b/drivers/storage/class/disk/disk.c
index e0c775688d..cb84565691 100644
--- a/drivers/storage/class/disk/disk.c
+++ b/drivers/storage/class/disk/disk.c
@@ -2235,58 +2235,69 @@ Return Value:
sizeof(PARTITION_INFORMATION)) {
status = STATUS_INFO_LENGTH_MISMATCH;
-
+ break;
}
-#if 0 // HACK: ReactOS partition numbers must be wrong
- else if (diskData->PartitionNumber == 0) {
+
+ //
+ // Update the geometry in case it has changed.
+ //
+
+ status = UpdateRemovableGeometry (DeviceObject, Irp);
+
+ if (!NT_SUCCESS(status)) {
//
- // Partition zero is not a partition so this is not a
- // reasonable request.
+ // Note the drive is not ready.
//
- status = STATUS_INVALID_DEVICE_REQUEST;
-
+ diskData->DriveNotReady = TRUE;
+ break;
}
-#endif
- else {
- PPARTITION_INFORMATION outputBuffer;
+ //
+ // Note the drive is now ready.
+ //
- if (diskData->PartitionNumber == 0) {
- DPRINT1("HACK: Handling partition 0 request!\n");
- //ASSERT(FALSE);
- }
+ diskData->DriveNotReady = FALSE;
- //
- // Update the geometry in case it has changed.
- //
+ //
+ // Handle the case were we query the whole disk
+ //
- status = UpdateRemovableGeometry (DeviceObject, Irp);
+ if (diskData->PartitionNumber == 0) {
- if (!NT_SUCCESS(status)) {
+ PPARTITION_INFORMATION outputBuffer;
- //
- // Note the drive is not ready.
- //
+ outputBuffer =
+ (PPARTITION_INFORMATION)Irp->AssociatedIrp.SystemBuffer;
- diskData->DriveNotReady = TRUE;
- break;
- }
+ outputBuffer->PartitionType = PARTITION_ENTRY_UNUSED;
+ outputBuffer->StartingOffset = deviceExtension->StartingOffset;
+ outputBuffer->PartitionLength.QuadPart = deviceExtension->PartitionLength.QuadPart;
+ outputBuffer->HiddenSectors = 0;
+ outputBuffer->PartitionNumber = diskData->PartitionNumber;
+ outputBuffer->BootIndicator = FALSE;
+ outputBuffer->RewritePartition = FALSE;
+ outputBuffer->RecognizedPartition = FALSE;
+
+ status = STATUS_SUCCESS;
+ Irp->IoStatus.Information = sizeof(PARTITION_INFORMATION);
+
+ } else {
+
+ PPARTITION_INFORMATION outputBuffer;
//
- // Note the drive is now ready.
+ // We query a single partition here
+ // FIXME: this can only work for MBR-based disks, check for this!
//
- diskData->DriveNotReady = FALSE;
-
outputBuffer =
(PPARTITION_INFORMATION)Irp->AssociatedIrp.SystemBuffer;
outputBuffer->PartitionType = diskData->PartitionType;
outputBuffer->StartingOffset = deviceExtension->StartingOffset;
- outputBuffer->PartitionLength.QuadPart = (diskData->PartitionNumber) ?
- deviceExtension->PartitionLength.QuadPart : 0x1FFFFFFFFFFFFFFFLL; // HACK
+ outputBuffer->PartitionLength.QuadPart = deviceExtension->PartitionLength.QuadPart;
outputBuffer->HiddenSectors = diskData->HiddenSectors;
outputBuffer->PartitionNumber = diskData->PartitionNumber;
outputBuffer->BootIndicator = diskData->BootIndicator;