Author: pschweitzer
Date: Wed Oct 15 20:36:30 2014
New Revision: 64753
URL:
http://svn.reactos.org/svn/reactos?rev=64753&view=rev
Log:
[NTFS]
Implement NtfsFileFlagsToAttributes() to fix some of the attributes of the MFT to make
them usable by ReactOS.
Would deserve a double-check
Modified:
trunk/reactos/drivers/filesystems/ntfs/misc.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] Wed Oct 15 20:36:30 2014
@@ -109,4 +109,19 @@
SystemTime->QuadPart = NtfsTime + 116444736000000000;
}
+VOID
+NtfsFileFlagsToAttributes(ULONG NtfsAttributes,
+ PULONG FileAttributes)
+{
+ *FileAttributes = NtfsAttributes;
+ if ((NtfsAttributes & NTFS_FILE_TYPE_DIRECTORY) == NTFS_FILE_TYPE_DIRECTORY)
+ {
+ *FileAttributes = NtfsAttributes & ~NTFS_FILE_TYPE_DIRECTORY;
+ *FileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
+ }
+
+ if (NtfsAttributes == 0)
+ *FileAttributes = FILE_ATTRIBUTE_NORMAL;
+}
+
/* EOF */
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Wed Oct 15 20:36:30 2014
@@ -686,11 +686,9 @@
NtfsDateTimeToFileTime(ULONGLONG NtfsTime,
PLARGE_INTEGER SystemTime);
-#if 0
-VOID
-CdfsFileFlagsToAttributes(PFCB Fcb,
- PULONG FileAttributes);
-#endif
+VOID
+NtfsFileFlagsToAttributes(ULONG NtfsAttributes,
+ PULONG FileAttributes);
/* rw.c */