[NDK]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 1 Oct 2017 12:56:00 +0000 (12:56 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 1 Oct 2017 12:56:00 +0000 (12:56 +0000)
Define REPARSE_DATA_BUFFER so that we can stop redefining it everywhere...

svn path=/trunk/; revision=76018

reactos/dll/shellext/shellbtrfs/shellext.h
reactos/dll/win32/kernel32/client/file/create.c
reactos/dll/win32/kernel32/client/file/dir.c
reactos/sdk/include/ndk/iotypes.h

index 62017d9..152f4a1 100644 (file)
@@ -114,6 +114,7 @@ GetFileInformationByHandleEx(HANDLE hFile, FILE_INFO_BY_HANDLE_CLASS FileInforma
 #endif
 #endif
 
+#ifndef __REACTOS__
 typedef struct _REPARSE_DATA_BUFFER {
     ULONG ReparseTag;
     USHORT ReparseDataLength;
@@ -144,6 +145,7 @@ typedef struct _REPARSE_DATA_BUFFER {
 } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
 
 #define SYMLINK_FLAG_RELATIVE 1
+#endif
 
 #ifndef FILE_SUPPORTS_BLOCK_REFCOUNTING
 
index a633f37..ec91f9a 100644 (file)
 DEBUG_CHANNEL(kernel32file);
 #endif
 
-#define SYMLINK_FLAG_RELATIVE   1
-
-typedef struct _REPARSE_DATA_BUFFER {
-    ULONG  ReparseTag;
-    USHORT ReparseDataLength;
-    USHORT Reserved;
-    union {
-        struct {
-            USHORT SubstituteNameOffset;
-            USHORT SubstituteNameLength;
-            USHORT PrintNameOffset;
-            USHORT PrintNameLength;
-            ULONG Flags;
-            WCHAR PathBuffer[1];
-        } SymbolicLinkReparseBuffer;
-        struct {
-            USHORT SubstituteNameOffset;
-            USHORT SubstituteNameLength;
-            USHORT PrintNameOffset;
-            USHORT PrintNameLength;
-            WCHAR PathBuffer[1];
-        } MountPointReparseBuffer;
-        struct {
-            UCHAR  DataBuffer[1];
-        } GenericReparseBuffer;
-    };
-} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
-
-#define REPARSE_DATA_BUFFER_HEADER_SIZE   FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)
-
 /* FUNCTIONS ****************************************************************/
 
 /*
index 7f11393..433e6d5 100644 (file)
    s[19] == '-' && s[24] == '-' && s[29] == '-' && \
    s[34] == '-' && s[47] == '}')
 
-/* FIXME - Get it out of here */
-typedef struct _REPARSE_DATA_BUFFER {
-    ULONG  ReparseTag;
-    USHORT ReparseDataLength;
-    USHORT Reserved;
-    union {
-        struct {
-            USHORT SubstituteNameOffset;
-            USHORT SubstituteNameLength;
-            USHORT PrintNameOffset;
-            USHORT PrintNameLength;
-            ULONG Flags;
-            WCHAR PathBuffer[1];
-        } SymbolicLinkReparseBuffer;
-        struct {
-            USHORT SubstituteNameOffset;
-            USHORT SubstituteNameLength;
-            USHORT PrintNameOffset;
-            USHORT PrintNameLength;
-            WCHAR PathBuffer[1];
-        } MountPointReparseBuffer;
-        struct {
-            UCHAR  DataBuffer[1];
-        } GenericReparseBuffer;
-    };
-} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
-
 /* FUNCTIONS *****************************************************************/
 
 /*
index c97662b..0124da6 100644 (file)
@@ -1314,6 +1314,38 @@ typedef VOID
 #define IOCTL_TAPE_CREATE_PARTITION     \
     CTL_CODE(FILE_DEVICE_TAPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
 
+//
+// Reparse points
+//
+
+#define SYMLINK_FLAG_RELATIVE   1
+
+typedef struct _REPARSE_DATA_BUFFER {
+  ULONG ReparseTag;
+  USHORT ReparseDataLength;
+  USHORT Reserved;
+  _ANONYMOUS_UNION union {
+    struct {
+      USHORT SubstituteNameOffset;
+      USHORT SubstituteNameLength;
+      USHORT PrintNameOffset;
+      USHORT PrintNameLength;
+      ULONG Flags;
+      WCHAR PathBuffer[1];
+    } SymbolicLinkReparseBuffer;
+    struct {
+      USHORT SubstituteNameOffset;
+      USHORT SubstituteNameLength;
+      USHORT PrintNameOffset;
+      USHORT PrintNameLength;
+      WCHAR PathBuffer[1];
+    } MountPointReparseBuffer;
+    struct {
+      UCHAR DataBuffer[1];
+    } GenericReparseBuffer;
+  } DUMMYUNIONNAME;
+} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
+
 #endif // NTOS_MODE_USER
 
 #endif