[UDFS]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 5 Jun 2017 15:54:51 +0000 (15:54 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 5 Jun 2017 15:54:51 +0000 (15:54 +0000)
Misc fixes by Thomas.

CORE-4375

svn path=/trunk/; revision=74925

reactos/drivers/filesystems/udfs/Include/phys_lib.h
reactos/drivers/filesystems/udfs/close.cpp
reactos/drivers/filesystems/udfs/fscntrl.cpp
reactos/drivers/filesystems/udfs/misc.cpp
reactos/drivers/filesystems/udfs/protos.h
reactos/drivers/filesystems/udfs/udf_info/phys_eject.cpp
reactos/drivers/filesystems/udfs/udf_info/remap.cpp
reactos/drivers/filesystems/udfs/udfinit.cpp

index ec7c76f..1ec4fe3 100644 (file)
@@ -96,7 +96,7 @@ extern OSSTATUS UDFGetBlockSize(PDEVICE_OBJECT DeviceObject, // the target devic
 extern OSSTATUS UDFGetDiskInfo(IN PDEVICE_OBJECT DeviceObject, // the target device object
                                IN PVCB           Vcb);         // Volume control block from this DevObj
 
-extern VOID     UDFEjectReqWaiter(IN PVOID Context);
+extern VOID NTAPI UDFEjectReqWaiter(IN PVOID Context);
 
 extern VOID     UDFStopEjectWaiter(PVCB Vcb);
 
@@ -182,4 +182,4 @@ OSSTATUS UDFResetDeviceDriver(IN PVCB Vcb,
                               IN BOOLEAN Unlock);
 
 
-#endif //__UDF_PHYS_LIB__H__
\ No newline at end of file
+#endif //__UDF_PHYS_LIB__H__
index 89176fe..a75954e 100644 (file)
@@ -686,6 +686,7 @@ UDFDoDelayedClose(
     It operates until reach lower threshold
  */
 VOID
+NTAPI
 UDFDelayedClose(
     PVOID unused
     )
index 02dbd94..2dd3e5d 100644 (file)
@@ -900,7 +900,7 @@ UDFStartEjectWaiter(
         // terminates automatically
         ASSERT(!(Vcb->VCBFlags & UDF_VCB_FLAGS_STOP_WAITER_EVENT));
         Vcb->VCBFlags |= UDF_VCB_FLAGS_STOP_WAITER_EVENT;
-        ExInitializeWorkItem(&(Vcb->EjectWaiter->EjectReqWorkQueueItem), (PWORKER_THREAD_ROUTINE)UDFEjectReqWaiter, Vcb->EjectWaiter);
+        ExInitializeWorkItem(&(Vcb->EjectWaiter->EjectReqWorkQueueItem), UDFEjectReqWaiter, Vcb->EjectWaiter);
         UDFPrint(("UDFStartEjectWaiter: create thread\n"));
         ExQueueWorkItem(&(Vcb->EjectWaiter->EjectReqWorkQueueItem), DelayedWorkQueue);
     } else {
index b4a8447..8aad9e7 100644 (file)
@@ -1174,7 +1174,7 @@ UDFPostRequest(
         KeReleaseSpinLock( &(Vcb->OverflowQueueSpinLock), SavedIrql );
 
         // queue up the request
-        ExInitializeWorkItem(&(PtrIrpContext->WorkQueueItem), (PWORKER_THREAD_ROUTINE)UDFCommonDispatch, PtrIrpContext);
+        ExInitializeWorkItem(&(PtrIrpContext->WorkQueueItem), UDFCommonDispatch, PtrIrpContext);
 
         ExQueueWorkItem(&(PtrIrpContext->WorkQueueItem), CriticalWorkQueue);
     //    ExQueueWorkItem(&(PtrIrpContext->WorkQueueItem), DelayedWorkQueue);
@@ -1204,6 +1204,7 @@ UDFPostRequest(
 *
 *************************************************************************/
 VOID
+NTAPI
 UDFCommonDispatch(
     IN PVOID Context   // actually is a pointer to IRPContext structure
     )
index 6bf5e4e..f118b74 100644 (file)
@@ -87,7 +87,7 @@ extern ULONG    UDFCleanUpFcbChain(IN PVCB Vcb,
 
 extern VOID UDFCloseAllDelayed(PVCB Vcb);
 
-extern VOID UDFDelayedClose(PVOID unused = NULL);
+extern VOID NTAPI UDFDelayedClose(PVOID unused = NULL);
 
 extern NTSTATUS UDFCloseAllXXXDelayedInDir(IN PVCB           Vcb,
                                            IN PUDF_FILE_INFO FileInfo,
@@ -642,7 +642,7 @@ extern NTSTATUS UDFPostRequest(
 PtrUDFIrpContext            PtrIrpContext,
 PIRP                        Irp);
 
-extern VOID UDFCommonDispatch(
+extern VOID NTAPI UDFCommonDispatch(
 VOID                            *Context);  // actually an IRPContext structure
 
 extern NTSTATUS UDFInitializeVCB(
@@ -756,7 +756,7 @@ extern OSSTATUS UDFGetBlockSize(PDEVICE_OBJECT DeviceObject, // the target devic
 extern OSSTATUS UDFGetDiskInfo(IN PDEVICE_OBJECT DeviceObject, // the target device object
                                IN PVCB           Vcb);         // Volume control block from this DevObj
 
-extern VOID     UDFEjectReqWaiter(IN PVOID Context);
+extern VOID NTAPI UDFEjectReqWaiter(IN PVOID Context);
 
 extern VOID     UDFStopEjectWaiter(PVCB Vcb);
 
index 4280633..ac4ca0a 100644 (file)
@@ -26,6 +26,7 @@ UDFKeyWaiter(
     This routine checks for User Eject request & initiates Dismount
  */
 void
+NTAPI
 UDFEjectReqWaiter(
     IN void* Context
     )
index 2ca76b2..646f7eb 100644 (file)
@@ -537,10 +537,12 @@ UDFVForget(
 } // end UDFVForget()
 
 VOID
+NTAPI
 UDFVWorkItem(
-    PUDF_VERIFY_REQ VerifyReq
+    PVOID Context
     )
 {
+    PUDF_VERIFY_REQ VerifyReq = (PUDF_VERIFY_REQ)Context;
     PVCB Vcb = VerifyReq->Vcb;
     ULONG ReadBytes;
 //    OSSTATUS RC;
@@ -703,7 +705,7 @@ UDFVVerify(
                         InterlockedIncrement((PLONG)&(VerifyCtx->QueuedCount));
 #ifndef _CONSOLE
                         ExInitializeWorkItem( &(VerifyReq->VerifyItem),
-                                              (PWORKER_THREAD_ROUTINE) UDFVWorkItem,
+                                              UDFVWorkItem,
                                               VerifyReq );
                         ExQueueWorkItem( &(VerifyReq->VerifyItem), CriticalWorkQueue );
 #else
index ca94387..c5f664f 100644 (file)
@@ -179,7 +179,7 @@ DriverEntry(
             InitializeListHead( &UDFGlobalData.DirDelayedCloseQueue );
 
             ExInitializeWorkItem( &UDFGlobalData.CloseItem,
-                                  (PWORKER_THREAD_ROUTINE) UDFDelayedClose,
+                                  UDFDelayedClose,
                                   NULL );
 
             UDFGlobalData.DelayedCloseCount = 0;
@@ -312,7 +312,7 @@ DriverEntry(
             FsRegistered = TRUE;
 
             UDFPrint(("UDF: IoRegisterFsRegistrationChange()\n"));
-            IoRegisterFsRegistrationChange( DriverObject, (PDRIVER_FS_NOTIFICATION)UDFFsNotification );
+            IoRegisterFsRegistrationChange( DriverObject, UDFFsNotification );
 
 //            delay.QuadPart = -10000000;
 //            KeDelayExecutionThread(KernelMode, FALSE, &delay);        //10 microseconds