From 37630ef0ab346c21dfd22798ff77f47b25e75824 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 1 Oct 2017 12:56:00 +0000 Subject: [PATCH] [NDK] Define REPARSE_DATA_BUFFER so that we can stop redefining it everywhere... svn path=/trunk/; revision=76018 --- reactos/dll/shellext/shellbtrfs/shellext.h | 2 ++ .../dll/win32/kernel32/client/file/create.c | 30 ----------------- reactos/dll/win32/kernel32/client/file/dir.c | 27 ---------------- reactos/sdk/include/ndk/iotypes.h | 32 +++++++++++++++++++ 4 files changed, 34 insertions(+), 57 deletions(-) diff --git a/reactos/dll/shellext/shellbtrfs/shellext.h b/reactos/dll/shellext/shellbtrfs/shellext.h index 62017d90c85..152f4a1254a 100644 --- a/reactos/dll/shellext/shellbtrfs/shellext.h +++ b/reactos/dll/shellext/shellbtrfs/shellext.h @@ -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 diff --git a/reactos/dll/win32/kernel32/client/file/create.c b/reactos/dll/win32/kernel32/client/file/create.c index a633f3795bf..ec91f9a9dbf 100644 --- a/reactos/dll/win32/kernel32/client/file/create.c +++ b/reactos/dll/win32/kernel32/client/file/create.c @@ -21,36 +21,6 @@ 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 ****************************************************************/ /* diff --git a/reactos/dll/win32/kernel32/client/file/dir.c b/reactos/dll/win32/kernel32/client/file/dir.c index 7f11393d699..433e6d59664 100644 --- a/reactos/dll/win32/kernel32/client/file/dir.c +++ b/reactos/dll/win32/kernel32/client/file/dir.c @@ -27,33 +27,6 @@ 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 *****************************************************************/ /* diff --git a/reactos/sdk/include/ndk/iotypes.h b/reactos/sdk/include/ndk/iotypes.h index c97662bd64e..0124da61258 100644 --- a/reactos/sdk/include/ndk/iotypes.h +++ b/reactos/sdk/include/ndk/iotypes.h @@ -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