Changes by: flatcap
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4105
Modified Files:
ntfsinfo.c
Log Message:
Cristi Klein - display the namespace of the file's name
Index: ntfsinfo.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsinfo.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- ntfsinfo.c 8 Jun 2005 18:01:46 -0000 1.61
+++ ntfsinfo.c 9 Jun 2005 08:29:03 -0000 1.62
@@ -3,8 +3,9 @@
*
* Copyright (c) 2002-2004 Matthew J. Fanto
* Copyright (c) 2002-2004 Anton Altaparmakov
- * Copyright (c) 2002-2003 Richard Russon
+ * Copyright (c) 2002-2005 Richard Russon
* Copyright (c) 2004-2005 Yura Pakhuchiy
+ * Copyright (c) 2005 Cristian Klein
*
* This utility will dump a file's attributes.
*
@@ -628,6 +629,7 @@ static void ntfs_dump_attr_list(ATTR_REC
static void ntfs_dump_attr_file_name(ATTR_RECORD *attr)
{
FILE_NAME_ATTR *file_name_attr = NULL;
+ const char *mbs_file_type = NULL;
file_name_attr = (FILE_NAME_ATTR*)((char *)attr +
le16_to_cpu(attr->value_offset));
@@ -659,6 +661,25 @@ static void ntfs_dump_attr_file_name(ATT
printf("\tFile Name:\t\t unnamed?!?\n");
}
+ /* name space */
+ switch (file_name_attr->file_name_type) {
+ case FILE_NAME_POSIX:
+ mbs_file_type = "POSIX";
+ break;
+ case FILE_NAME_WIN32:
+ mbs_file_type = "Win32";
+ break;
+ case FILE_NAME_DOS:
+ mbs_file_type = "DOS";
+ break;
+ case FILE_NAME_WIN32_AND_DOS:
+ mbs_file_type = "Win32 & DOS";
+ break;
+ }
+ if (mbs_file_type == NULL) // should never happen
+ mbs_file_type = "(unknown)";
+ printf("\tNamespace:\t\t %s\n", mbs_file_type);
+
printf("\tAttribute instance:\t %u\n", le16_to_cpu(attr->instance));
/* other basic stuff about the file */
|