From c15ace965315ea758c5db37fc9a7cd42e9415f14 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 22 Jan 2016 16:08:23 -0800 Subject: [PATCH] sys: debug: FileInformationClassSym() --- src/sys/debug.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ src/sys/driver.h | 1 + src/sys/fileinfo.c | 16 ++++++++--- 3 files changed, 85 insertions(+), 4 deletions(-) diff --git a/src/sys/debug.c b/src/sys/debug.c index ae7c8777..101d0b66 100644 --- a/src/sys/debug.c +++ b/src/sys/debug.c @@ -167,4 +167,76 @@ const char *IoctlCodeSym(ULONG ControlCode) return "IOCTL:Unknown"; } } + +const char *FileInformationClassSym(FILE_INFORMATION_CLASS FileInformationClass) +{ + switch (FileInformationClass) + { + SYM(FileDirectoryInformation) + SYM(FileFullDirectoryInformation) + SYM(FileBothDirectoryInformation) + SYM(FileBasicInformation) + SYM(FileStandardInformation) + SYM(FileInternalInformation) + SYM(FileEaInformation) + SYM(FileAccessInformation) + SYM(FileNameInformation) + SYM(FileRenameInformation) + SYM(FileLinkInformation) + SYM(FileNamesInformation) + SYM(FileDispositionInformation) + SYM(FilePositionInformation) + SYM(FileFullEaInformation) + SYM(FileModeInformation) + SYM(FileAlignmentInformation) + SYM(FileAllInformation) + SYM(FileAllocationInformation) + SYM(FileEndOfFileInformation) + SYM(FileAlternateNameInformation) + SYM(FileStreamInformation) + SYM(FilePipeInformation) + SYM(FilePipeLocalInformation) + SYM(FilePipeRemoteInformation) + SYM(FileMailslotQueryInformation) + SYM(FileMailslotSetInformation) + SYM(FileCompressionInformation) + SYM(FileObjectIdInformation) + SYM(FileCompletionInformation) + SYM(FileMoveClusterInformation) + SYM(FileQuotaInformation) + SYM(FileReparsePointInformation) + SYM(FileNetworkOpenInformation) + SYM(FileAttributeTagInformation) + SYM(FileTrackingInformation) + SYM(FileIdBothDirectoryInformation) + SYM(FileIdFullDirectoryInformation) + SYM(FileValidDataLengthInformation) + SYM(FileShortNameInformation) + SYM(FileIoCompletionNotificationInformation) + SYM(FileIoStatusBlockRangeInformation) + SYM(FileIoPriorityHintInformation) + SYM(FileSfioReserveInformation) + SYM(FileSfioVolumeInformation) + SYM(FileHardLinkInformation) + SYM(FileProcessIdsUsingFileInformation) + SYM(FileNormalizedNameInformation) + SYM(FileNetworkPhysicalNameInformation) + SYM(FileIdGlobalTxDirectoryInformation) + SYM(FileIsRemoteDeviceInformation) + SYM(FileUnusedInformation) + SYM(FileNumaNodeInformation) + SYM(FileStandardLinkInformation) + SYM(FileRemoteProtocolInformation) + SYM(FileRenameInformationBypassAccessCheck) + SYM(FileLinkInformationBypassAccessCheck) + SYM(FileVolumeNameInformation) + SYM(FileIdInformation) + SYM(FileIdExtdDirectoryInformation) + SYM(FileReplaceCompletionInformation) + SYM(FileHardLinkFullIdInformation) + SYM(FileIdExtdBothDirectoryInformation) + default: + return "FILE_INFORMATION_CLASS:Unknown"; + } +} #endif diff --git a/src/sys/driver.h b/src/sys/driver.h index 429611e3..cc784bea 100644 --- a/src/sys/driver.h +++ b/src/sys/driver.h @@ -599,6 +599,7 @@ const char *NtStatusSym(NTSTATUS Status); const char *IrpMajorFunctionSym(UCHAR MajorFunction); const char *IrpMinorFunctionSym(UCHAR MajorFunction, UCHAR MinorFunction); const char *IoctlCodeSym(ULONG ControlCode); +const char *FileInformationClassSym(FILE_INFORMATION_CLASS FileInformationClass); static inline VOID FspDebugLogIrp(const char *func, PIRP Irp, NTSTATUS Result) { diff --git a/src/sys/fileinfo.c b/src/sys/fileinfo.c index 01242977..207b030d 100644 --- a/src/sys/fileinfo.c +++ b/src/sys/fileinfo.c @@ -37,7 +37,9 @@ VOID FspFsvolQueryInformationComplete( { FSP_ENTER_IOC(PAGED_CODE()); - FSP_LEAVE_IOC("%s", ""); + FSP_LEAVE_IOC("%s, FileObject=%p", + FileInformationClassSym(IrpSp->Parameters.QueryFile.FileInformationClass), + IrpSp->FileObject); } static NTSTATUS FspFsvolSetInformation( @@ -53,7 +55,9 @@ VOID FspFsvolSetInformationComplete( { FSP_ENTER_IOC(PAGED_CODE()); - FSP_LEAVE_IOC("%s", ""); + FSP_LEAVE_IOC("%s, FileObject=%p", + FileInformationClassSym(IrpSp->Parameters.SetFile.FileInformationClass), + IrpSp->FileObject); } NTSTATUS FspQueryInformation( @@ -69,7 +73,9 @@ NTSTATUS FspQueryInformation( FSP_RETURN(Result = STATUS_INVALID_DEVICE_REQUEST); } - FSP_LEAVE_MJ("%s", ""); + FSP_LEAVE_MJ("%s, FileObject=%p", + FileInformationClassSym(IrpSp->Parameters.QueryFile.FileInformationClass), + IrpSp->FileObject); } NTSTATUS FspSetInformation( @@ -85,5 +91,7 @@ NTSTATUS FspSetInformation( FSP_RETURN(Result = STATUS_INVALID_DEVICE_REQUEST); } - FSP_LEAVE_MJ("%s", ""); + FSP_LEAVE_MJ("%s, FileObject=%p", + FileInformationClassSym(IrpSp->Parameters.SetFile.FileInformationClass), + IrpSp->FileObject); }