- Print the major function codes if debug prints are enabled.
Modified: trunk/reactos/drivers/fs/vfat/misc.c

Modified: trunk/reactos/drivers/fs/vfat/misc.c
--- trunk/reactos/drivers/fs/vfat/misc.c	2005-01-25 21:12:52 UTC (rev 13282)
+++ trunk/reactos/drivers/fs/vfat/misc.c	2005-01-25 21:13:28 UTC (rev 13283)
@@ -13,6 +13,41 @@
 #define NDEBUG
 #include "vfat.h"
 
+/* GLOBALS ******************************************************************/
+
+const char* MajorFunctionNames[] =
+{
+     "IRP_MJ_CREATE",
+     "IRP_MJ_CREATE_NAMED_PIPE",
+     "IRP_MJ_CLOSE",
+     "IRP_MJ_READ",
+     "IRP_MJ_WRITE",
+     "IRP_MJ_QUERY_INFORMATION",
+     "IRP_MJ_SET_INFORMATION",
+     "IRP_MJ_QUERY_EA",
+     "IRP_MJ_SET_EA",
+     "IRP_MJ_FLUSH_BUFFERS",
+     "IRP_MJ_QUERY_VOLUME_INFORMATION",
+     "IRP_MJ_SET_VOLUME_INFORMATION",
+     "IRP_MJ_DIRECTORY_CONTROL",
+     "IRP_MJ_FILE_SYSTEM_CONTROL",
+     "IRP_MJ_DEVICE_CONTROL",
+     "IRP_MJ_INTERNAL_DEVICE_CONTROL",
+     "IRP_MJ_SHUTDOWN",
+     "IRP_MJ_LOCK_CONTROL",
+     "IRP_MJ_CLEANUP",
+     "IRP_MJ_CREATE_MAILSLOT",
+     "IRP_MJ_QUERY_SECURITY",
+     "IRP_MJ_SET_SECURITY",
+     "IRP_MJ_POWER",
+     "IRP_MJ_SYSTEM_CONTROL",
+     "IRP_MJ_DEVICE_CHANGE",
+     "IRP_MJ_QUERY_QUOTA",
+     "IRP_MJ_SET_QUOTA",
+     "IRP_MJ_PNP",
+     "IRP_MJ_MAXIMUM_FUNCTION"
+};
+
 /* FUNCTIONS ****************************************************************/
 
 static LONG QueueCount = 0;
@@ -57,10 +92,11 @@
    return Status;
 }
 
-NTSTATUS VfatDispatchRequest (
-        IN PVFAT_IRP_CONTEXT IrpContext)
+NTSTATUS 
+VfatDispatchRequest (IN PVFAT_IRP_CONTEXT IrpContext)
 {
-   DPRINT ("VfatDispatchRequest (IrpContext %x), MajorFunction %x\n", IrpContext, IrpContext->MajorFunction);
+    DPRINT ("VfatDispatchRequest (IrpContext %x), is called for %s\n", IrpContext, 
+	    IrpContext->MajorFunction >= IRP_MJ_MAXIMUM_FUNCTION ? "????" : MajorFunctionNames[IrpContext->MajorFunction]);
 
    ASSERT(IrpContext);