From 0d6305b3bcba5e72850f7c80ca948da797ff0889 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Tue, 25 Jan 2005 21:13:28 +0000 Subject: [PATCH] - Print the major function codes if debug prints are enabled. svn path=/trunk/; revision=13283 --- reactos/drivers/fs/vfat/misc.c | 42 +++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/fs/vfat/misc.c b/reactos/drivers/fs/vfat/misc.c index 1965f57f004..c3cc379f510 100644 --- a/reactos/drivers/fs/vfat/misc.c +++ b/reactos/drivers/fs/vfat/misc.c @@ -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 @@ Fail:; 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);