Author: pschweitzer
Date: Sat Oct 17 22:32:13 2015
New Revision: 69575
URL:
http://svn.reactos.org/svn/reactos?rev=69575&view=rev
Log:
[PSDK]
Mark (old) Linux partitions (notably extX volumes) as recognized by ReactOS in
IsRecognizedPartition()
This is only enabled when building ReactOS.Otherwise, it matches Windows definition.
Modified:
trunk/reactos/include/psdk/ntdddisk.h
trunk/reactos/include/psdk/winioctl.h
Modified: trunk/reactos/include/psdk/ntdddisk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdddisk.h?re…
==============================================================================
--- trunk/reactos/include/psdk/ntdddisk.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntdddisk.h [iso-8859-1] Sat Oct 17 22:32:13 2015
@@ -220,6 +220,10 @@
#define PARTITION_UNIX 0x63
#define VALID_NTFT 0xC0
#define PARTITION_NTFT 0x80
+#ifdef __REACTOS__
+#define PARTITION_OLD_LINUX 0x43
+#define PARTITION_LINUX 0x83
+#endif
#define IsFTPartition( PartitionType ) \
(((PartitionType) & PARTITION_NTFT) && \
@@ -229,6 +233,24 @@
(((PartitionType) == PARTITION_EXTENDED) || \
((PartitionType) == PARTITION_XINT13_EXTENDED))
+#ifdef __REACTOS__
+#define IsRecognizedPartition(PartitionType) ( \
+ (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_FAT_12)) || \
+ (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_HUGE)) || \
+ (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_IFS)) || \
+ (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_FAT32)) || \
+ (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_FAT32_XINT13)) || \
+ (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_XINT13)) || \
+ ((PartitionType) == PARTITION_FAT_12) || \
+ ((PartitionType) == PARTITION_FAT_16) || \
+ ((PartitionType) == PARTITION_HUGE) || \
+ ((PartitionType) == PARTITION_IFS) || \
+ ((PartitionType) == PARTITION_FAT32) || \
+ ((PartitionType) == PARTITION_FAT32_XINT13) || \
+ ((PartitionType) == PARTITION_XINT13) || \
+ ((PartitionType) == PARTITION_LINUX) || \
+ ((PartitionType) == PARTITION_OLD_LINUX))
+#else
#define IsRecognizedPartition(PartitionType) ( \
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_FAT_12)) || \
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) ==
PARTITION_HUGE)) || \
@@ -243,6 +265,7 @@
((PartitionType) == PARTITION_FAT32) || \
((PartitionType) == PARTITION_FAT32_XINT13) || \
((PartitionType) == PARTITION_XINT13))
+#endif
#if(_WIN32_WINNT >= 0x0500)
#define GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY 0x10000000
Modified: trunk/reactos/include/psdk/winioctl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winioctl.h?re…
==============================================================================
--- trunk/reactos/include/psdk/winioctl.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winioctl.h [iso-8859-1] Sat Oct 17 22:32:13 2015
@@ -192,8 +192,12 @@
#define PARTITION_PREP 0x41
#define PARTITION_LDM 0x42
#define PARTITION_UNIX 0x63
-#define PARTITION_NTFT 128
+#define PARTITION_NTFT 0x80
#define VALID_NTFT 0xC0
+#ifdef __REACTOS__
+#define PARTITION_OLD_LINUX 0x43
+#define PARTITION_LINUX 0x83
+#endif
#define SERIAL_LSRMST_ESCAPE 0
#define SERIAL_LSRMST_LSR_DATA 1
#define SERIAL_LSRMST_LSR_NODATA 2
@@ -576,6 +580,25 @@
UCHAR FileRecordBuffer[1];
} NTFS_FILE_RECORD_OUTPUT_BUFFER, *PNTFS_FILE_RECORD_OUTPUT_BUFFER;
+#ifdef __REACTOS__
+#define IsRecognizedPartition(t)\
+ (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_12))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_16))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_IFS))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_HUGE))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32_XINT13))||\
+ ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13))||\
+ ((t&~PARTITION_NTFT)==PARTITION_FAT_12)||\
+ ((t&~PARTITION_NTFT)==PARTITION_FAT_16)||\
+ ((t&~PARTITION_NTFT)==PARTITION_IFS)||\
+ ((t&~PARTITION_NTFT)==PARTITION_HUGE)||\
+ ((t&~PARTITION_NTFT)==PARTITION_FAT32)||\
+ ((t&~PARTITION_NTFT)==PARTITION_FAT32_XINT13)||\
+ ((t&~PARTITION_NTFT)==PARTITION_XINT13)||\
+ ((t&~PARTITION_NTFT)==PARTITION_LINUX)||\
+ ((t&~PARTITION_NTFT)==PARTITION_OLD_LINUX))
+#else
#define IsRecognizedPartition(t)\
(((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_12))||\
((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_16))||\
@@ -591,6 +614,7 @@
((t&~PARTITION_NTFT)==PARTITION_FAT32)||\
((t&~PARTITION_NTFT)==PARTITION_FAT32_XINT13)||\
((t&~PARTITION_NTFT)==PARTITION_XINT13))
+#endif
#define IsContainerPartition(t)\
(((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_EXTENDED))||\
((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13_EXTENDED))||\