/*
* ReactOS kernel
- * Copyright (C) 2002 ReactOS Team
+ * Copyright (C) 2002,2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
- * FILE: services/fs/ntfs/attrib.c
+ * FILE: drivers/fs/ntfs/attrib.c
* PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl
*/
#include <ddk/ntddk.h>
-//#define NDEBUG
+#define NDEBUG
#include <debug.h>
#include "ntfs.h"
/* FUNCTIONS ****************************************************************/
VOID
+NtfsDumpFileNameAttribute(PATTRIBUTE Attribute)
+{
+ PRESIDENT_ATTRIBUTE ResAttr;
+ PFILENAME_ATTRIBUTE FileNameAttr;
+
+ DbgPrint(" $FILE_NAME ");
+
+ ResAttr = (PRESIDENT_ATTRIBUTE)Attribute;
+// DbgPrint(" Length %lu Offset %hu ", ResAttr->ValueLength, ResAttr->ValueOffset);
+
+ FileNameAttr = (PFILENAME_ATTRIBUTE)((PVOID)ResAttr + ResAttr->ValueOffset);
+ DbgPrint(" '%.*S' ", FileNameAttr->NameLength, FileNameAttr->Name);
+}
+
+
+VOID
+NtfsDumpVolumeNameAttribute(PATTRIBUTE Attribute)
+{
+ PRESIDENT_ATTRIBUTE ResAttr;
+ PWCHAR VolumeName;
+
+ DbgPrint(" $VOLUME_NAME ");
+
+ ResAttr = (PRESIDENT_ATTRIBUTE)Attribute;
+// DbgPrint(" Length %lu Offset %hu ", ResAttr->ValueLength, ResAttr->ValueOffset);
+
+ VolumeName = (PWCHAR)((PVOID)ResAttr + ResAttr->ValueOffset);
+ DbgPrint(" '%.*S' ", ResAttr->ValueLength/2, VolumeName);
+}
+
+
+VOID
+NtfsDumpVolumeInformationAttribute(PATTRIBUTE Attribute)
+{
+ PRESIDENT_ATTRIBUTE ResAttr;
+ PVOLINFO_ATTRIBUTE VolInfoAttr;
+
+ DbgPrint(" $VOLUME_INFORMATION ");
+
+ ResAttr = (PRESIDENT_ATTRIBUTE)Attribute;
+// DbgPrint(" Length %lu Offset %hu ", ResAttr->ValueLength, ResAttr->ValueOffset);
+
+ VolInfoAttr = (PVOLINFO_ATTRIBUTE)((PVOID)ResAttr + ResAttr->ValueOffset);
+ DbgPrint(" NTFS Version %u.%u Flags 0x%04hx ",
+ VolInfoAttr->MajorVersion,
+ VolInfoAttr->MinorVersion,
+ VolInfoAttr->Flags);
+}
+
+
+VOID
NtfsDumpAttribute(PATTRIBUTE Attribute)
{
PNONRESIDENT_ATTRIBUTE NresAttr;
break;
case AttributeFileName:
- DbgPrint(" $FILE_NAME ");
+ NtfsDumpFileNameAttribute(Attribute);
break;
case AttributeObjectId:
break;
case AttributeVolumeName:
- DbgPrint(" $VOLUME_NAME ");
+ NtfsDumpVolumeNameAttribute(Attribute);
break;
case AttributeVolumeInformation:
- DbgPrint(" $VOLUME_INFORMATION ");
+ NtfsDumpVolumeInformationAttribute(Attribute);
break;
case AttributeData:
}
DbgPrint("(%s)\n",
- Attribute->Nonresident ? "nonresident" : "resident");
+ Attribute->Nonresident ? "non-resident" : "resident");
if (Attribute->Nonresident != 0)
{