[ros-diffs] [fireball] 30424: - Make file lock and unlock operations succeed without doing actual locking (enough to make some apps work even if they don't have proper locking). DPRINT1s are inserted, so that this is not going to be forgotten.

fireball at svn.reactos.org fireball at svn.reactos.org
Tue Nov 13 16:45:33 CET 2007


Author: fireball
Date: Tue Nov 13 18:45:33 2007
New Revision: 30424

URL: http://svn.reactos.org/svn/reactos?rev=30424&view=rev
Log:
- Make file lock and unlock operations succeed without doing actual locking (enough to make some apps work even if they don't have proper locking). DPRINT1s are inserted, so that this is not going to be forgotten.

Modified:
    trunk/reactos/ntoskrnl/fsrtl/filelock.c

Modified: trunk/reactos/ntoskrnl/fsrtl/filelock.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/filelock.c?rev=30424&r1=30423&r2=30424&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/filelock.c (original)
+++ trunk/reactos/ntoskrnl/fsrtl/filelock.c Tue Nov 13 18:45:33 2007
@@ -77,8 +77,34 @@
                  IN PVOID Context OPTIONAL,
                  IN BOOLEAN AlreadySynchronized)
 {
-    KEBUGCHECK(0);
-    return FALSE;
+    NTSTATUS Status;
+
+    DPRINT1("FsRtlPrivateLock() is stubplemented!\n");
+
+    /* Initialize the lock, if necessary */
+    if (!FileLock->LockInformation)
+    {
+        DPRINT("LockInformation is uninitialized!\n");
+    }
+
+    /* Assume all is cool, and lock is set */
+    IoStatus->Status = STATUS_SUCCESS;
+
+    if (Irp)
+    {
+        /* Complete the request */
+        FsRtlCompleteLockIrpReal(FileLock->CompleteLockIrpRoutine,
+                                 Context,
+                                 Irp,
+                                 IoStatus->Status,
+                                 &Status,
+                                 FileObject);
+
+        /* Update the status */
+        IoStatus->Status = Status;
+    }
+
+    return TRUE;
 }
 
 /*
@@ -151,8 +177,9 @@
                       IN PVOID Context OPTIONAL,
                       IN BOOLEAN AlreadySynchronized)
 {
-    KEBUGCHECK(0);
-    return STATUS_UNSUCCESSFUL;
+    DPRINT1("FsRtlFastUnlockSingle() is stubplemented!\n");
+
+    return STATUS_SUCCESS;
 }
 
 /*




More information about the Ros-diffs mailing list