#ifndef __NTDDDISK_H
#define __NTDDDISK_H
-#if __GNUC__ >=3
-#pragma GCC system_header
+/* Helper macro to enable gcc's extension. */
+#ifndef __GNU_EXTENSION
+#ifdef __GNUC__
+#define __GNU_EXTENSION __extension__
+#else
+#define __GNU_EXTENSION
+#endif
#endif
#include "ntddstor.h"
typedef struct _PARTITION_INFORMATION {
LARGE_INTEGER StartingOffset;
LARGE_INTEGER PartitionLength;
- DWORD HiddenSectors;
- DWORD PartitionNumber;
- BYTE PartitionType;
+ ULONG HiddenSectors;
+ ULONG PartitionNumber;
+ UCHAR PartitionType;
BOOLEAN BootIndicator;
BOOLEAN RecognizedPartition;
BOOLEAN RewritePartition;
WCHAR Name [36];
} PARTITION_INFORMATION_GPT, *PPARTITION_INFORMATION_GPT;
+typedef enum _PARTITION_STYLE {
+ PARTITION_STYLE_MBR,
+ PARTITION_STYLE_GPT,
+ PARTITION_STYLE_RAW
+} PARTITION_STYLE;
+
typedef struct _DISK_PARTITION_INFO {
ULONG SizeOfPartitionInfo;
PARTITION_STYLE PartitionStyle;
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
ULONG PartitionStyle;
ULONG PartitionCount;
- union {
+ __GNU_EXTENSION union {
DRIVE_LAYOUT_INFORMATION_MBR Mbr;
DRIVE_LAYOUT_INFORMATION_GPT Gpt;
};
} GET_LENGTH_INFORMATION, *PGET_LENGTH_INFORMATION;
typedef struct _REASSIGN_BLOCKS {
- WORD Reserved;
- WORD Count;
- DWORD BlockNumber[1];
+ USHORT Reserved;
+ USHORT Count;
+ ULONG BlockNumber[1];
} REASSIGN_BLOCKS, *PREASSIGN_BLOCKS;
typedef struct _SET_PARTITION_INFORMATION {
typedef struct _VERIFY_INFORMATION {
LARGE_INTEGER StartingOffset;
- DWORD Length;
+ ULONG Length;
} VERIFY_INFORMATION, *PVERIFY_INFORMATION;
typedef enum {