Rebase against 4e2ad334b5881af7661be4d6df3c51aae92ca4a2

This commit is contained in:
Alistair Leslie-Hughes
2020-05-05 09:11:37 +10:00
committed by Zebediah Figura
parent d4918b4305
commit 76ba9d2387
27 changed files with 209 additions and 302 deletions

View File

@@ -1,4 +1,4 @@
From 5f8071c1a278c96b1fd0a83b4b9924ed69520e5e Mon Sep 17 00:00:00 2001
From 74693bc85e3dbc1f757cfea348dc385b4badeb89 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 19 Aug 2014 22:10:49 -0600
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
@@ -14,7 +14,7 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
create mode 100644 libs/port/xattr.c
diff --git a/configure.ac b/configure.ac
index af9175dfaad..4cbd823f5e0 100644
index 180d958fc4ef..1e3d2e0d4ef0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib
@@ -25,7 +25,7 @@ index af9175dfaad..4cbd823f5e0 100644
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]),
@@ -699,6 +700,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
@@ -709,6 +710,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
#include <sys/socket.h>
#endif])
@@ -44,7 +44,7 @@ index af9175dfaad..4cbd823f5e0 100644
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 583da3a236e..f8227f10163 100644
index 9a9acfdb623b..5536e61db2e4 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -126,6 +126,22 @@ mode_t FILE_umask = 0;
@@ -71,7 +71,7 @@ index 583da3a236e..f8227f10163 100644
static inline ULONG get_file_attributes( const struct stat *st )
{
diff --git a/include/wine/port.h b/include/wine/port.h
index 5a805c11993..c0efa12fbde 100644
index e8434c73cca2..f0507efcc7e7 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -361,6 +361,14 @@ int usleep (unsigned int useconds);
@@ -86,14 +86,14 @@ index 5a805c11993..c0efa12fbde 100644
+
+extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
+
/* Interlocked functions */
#else /* NO_LIBWINE_PORT */
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 695938ae434..9796bc40537 100644
index 1963afe24232..4b1ecab7516b 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -23,4 +23,5 @@ C_SRCS = \
@@ -22,4 +22,5 @@ C_SRCS = \
strnlen.c \
symlink.c \
usleep.c \
@@ -102,7 +102,7 @@ index 695938ae434..9796bc40537 100644
+ xattr.c
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
new file mode 100644
index 00000000000..94b77132bbf
index 000000000000..94b77132bbf2
--- /dev/null
+++ b/libs/port/xattr.c
@@ -0,0 +1,39 @@
@@ -146,5 +146,5 @@ index 00000000000..94b77132bbf
+#endif
+}
--
2.25.1
2.26.2

View File

@@ -1,4 +1,4 @@
From 4f3272686f4ae084510f96baa5ad52bbf74d3d8d Mon Sep 17 00:00:00 2001
From 34ed49d7dbff7c5f0da8553330c3378b574429fc Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 16:04:34 -0600
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
@@ -11,10 +11,10 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 43a13cd8fdf..74b346b51e8 100644
index 5536e61db2e4..2fd62ebfb802 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -183,7 +183,8 @@ int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULONG *attr
@@ -182,7 +182,8 @@ int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULONG *attr
int get_file_info( const char *path, struct stat *st, ULONG *attr )
{
char *parent_path;
@@ -24,7 +24,7 @@ index 43a13cd8fdf..74b346b51e8 100644
*attr = 0;
ret = lstat( path, st );
@@ -216,6 +217,9 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
@@ -215,6 +216,9 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
}
*attr |= get_file_attributes( st );
@@ -35,19 +35,19 @@ index 43a13cd8fdf..74b346b51e8 100644
}
diff --git a/include/wine/port.h b/include/wine/port.h
index 8fec3a34591..570988a9422 100644
index f0507efcc7e7..6e81cb71a76d 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -363,6 +363,7 @@ extern int mkstemps(char *template, int suffix_len);
@@ -368,6 +368,7 @@ extern int mkstemps(char *template, int suffix_len);
#endif
extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
+extern int xattr_get( const char *path, const char *name, void *value, size_t size );
/* Interlocked functions */
#else /* NO_LIBWINE_PORT */
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
index 94b77132bbf..88e900dac6d 100644
index 94b77132bbf2..88e900dac6d4 100644
--- a/libs/port/xattr.c
+++ b/libs/port/xattr.c
@@ -37,3 +37,13 @@ int xattr_fget( int filedes, const char *name, void *value, size_t size )
@@ -65,5 +65,5 @@ index 94b77132bbf..88e900dac6d 100644
+#endif
+}
--
2.25.1
2.26.2

View File

@@ -1,4 +1,4 @@
From b8d44b453c650178926c9d2a4eb44a3f05d34389 Mon Sep 17 00:00:00 2001
From 1a04bc9a0ef3cf03b89d50becee9240f8a195873 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 00:08:52 -0600
Subject: [PATCH] ntdll: Implement storing DOS attributes in
@@ -12,10 +12,10 @@ Subject: [PATCH] ntdll: Implement storing DOS attributes in
4 files changed, 60 insertions(+), 24 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 71706c832..674e0abea 100644
index 2fd62ebfb802..c077add9769e 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -169,6 +169,39 @@ int fd_get_file_info( int fd, struct stat *st, ULONG *attr )
@@ -178,6 +178,39 @@ int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULONG *attr
return ret;
}
@@ -55,7 +55,7 @@ index 71706c832..674e0abea 100644
/* get the stat info and file attributes for a file (by name) */
int get_file_info( const char *path, struct stat *st, ULONG *attr )
{
@@ -3050,7 +3083,6 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
@@ -3240,7 +3273,6 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
case FileBasicInformation:
if (len >= sizeof(FILE_BASIC_INFORMATION))
{
@@ -63,7 +63,7 @@ index 71706c832..674e0abea 100644
const FILE_BASIC_INFORMATION *info = ptr;
LARGE_INTEGER mtime, atime;
@@ -3064,25 +3096,7 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
@@ -3254,25 +3286,7 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
io->u.Status = set_file_times( fd, &mtime, &atime );
if (io->u.Status == STATUS_SUCCESS && info->FileAttributes)
@@ -91,10 +91,10 @@ index 71706c832..674e0abea 100644
if (needs_close) close( fd );
}
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index cfc48c4ab..e59cdba5e 100644
index 0b05c39685cd..b49a9a4dbbda 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -1364,7 +1364,7 @@ static void test_file_basic_information(void)
@@ -1365,7 +1365,7 @@ static void test_file_basic_information(void)
memset(&fbi, 0, sizeof(fbi));
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
@@ -103,7 +103,7 @@ index cfc48c4ab..e59cdba5e 100644
/* Then HIDDEN */
memset(&fbi, 0, sizeof(fbi));
@@ -1377,7 +1377,7 @@ static void test_file_basic_information(void)
@@ -1378,7 +1378,7 @@ static void test_file_basic_information(void)
memset(&fbi, 0, sizeof(fbi));
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
@@ -112,7 +112,7 @@ index cfc48c4ab..e59cdba5e 100644
/* Check NORMAL last of all (to make sure we can clear attributes) */
memset(&fbi, 0, sizeof(fbi));
@@ -1434,7 +1434,7 @@ static void test_file_all_information(void)
@@ -1435,7 +1435,7 @@ static void test_file_all_information(void)
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res);
@@ -121,7 +121,7 @@ index cfc48c4ab..e59cdba5e 100644
/* Then HIDDEN */
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
@@ -1447,7 +1447,7 @@ static void test_file_all_information(void)
@@ -1448,7 +1448,7 @@ static void test_file_all_information(void)
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
@@ -131,10 +131,10 @@ index cfc48c4ab..e59cdba5e 100644
/* Check NORMAL last of all (to make sure we can clear attributes) */
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
diff --git a/include/wine/port.h b/include/wine/port.h
index d4fc47080..44375d94e 100644
index 6e81cb71a76d..f90396727d6d 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -351,6 +351,8 @@ extern int mkstemps(char *template, int suffix_len);
@@ -368,6 +368,8 @@ extern int mkstemps(char *template, int suffix_len);
#endif
extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
@@ -142,9 +142,9 @@ index d4fc47080..44375d94e 100644
+extern int xattr_fset( int filedes, const char *name, void *value, size_t size );
extern int xattr_get( const char *path, const char *name, void *value, size_t size );
/* Interlocked functions */
#else /* NO_LIBWINE_PORT */
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
index 88e900dac..6918c9956 100644
index 88e900dac6d4..6918c9956cc6 100644
--- a/libs/port/xattr.c
+++ b/libs/port/xattr.c
@@ -38,6 +38,26 @@ int xattr_fget( int filedes, const char *name, void *value, size_t size )
@@ -175,5 +175,5 @@ index 88e900dac..6918c9956 100644
{
#if defined(HAVE_ATTR_XATTR_H)
--
2.22.0
2.26.2

View File

@@ -1,20 +1,20 @@
From e8aeb367e785ab32686c94c11b18ddcee9911206 Mon Sep 17 00:00:00 2001
From 8fde8af21e169d9a48bab50bac4d6e24238141b6 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 15:28:00 -0600
Subject: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile.
---
dlls/ntdll/file.c | 76 ++++++++++++++++++++++++++++----------------
dlls/ntdll/tests/directory.c | 24 +++++++-------
include/wine/port.h | 2 ++
libs/port/xattr.c | 20 ++++++++++++
dlls/ntdll/file.c | 76 +++++++++++++++++++++++-------------
dlls/ntdll/tests/directory.c | 24 ++++++------
include/wine/port.h | 2 +
libs/port/xattr.c | 20 ++++++++++
4 files changed, 82 insertions(+), 40 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 38c555e..3a96d3b 100644
index c077add9769e..a596afed72e7 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -224,6 +224,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
@@ -255,6 +255,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
return ret;
}
@@ -36,7 +36,7 @@ index 38c555e..3a96d3b 100644
/**************************************************************************
* FILE_CreateFile (internal)
* Open a file.
@@ -235,6 +250,10 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -266,6 +281,10 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
ULONG attributes, ULONG sharing, ULONG disposition,
ULONG options, PVOID ea_buffer, ULONG ea_length )
{
@@ -47,7 +47,7 @@ index 38c555e..3a96d3b 100644
ANSI_STRING unix_name;
BOOL created = FALSE;
@@ -278,37 +297,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -309,37 +328,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->u.Status = STATUS_SUCCESS;
}
@@ -109,7 +109,7 @@ index 38c555e..3a96d3b 100644
if (io->u.Status == STATUS_SUCCESS)
{
@@ -330,6 +346,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -361,6 +377,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->Information = FILE_OVERWRITTEN;
break;
}
@@ -121,7 +121,7 @@ index 38c555e..3a96d3b 100644
}
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
{
@@ -337,6 +358,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -368,6 +389,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" );
}
@@ -130,7 +130,7 @@ index 38c555e..3a96d3b 100644
}
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 2c6170b..0eed603 100644
index 4618f4eaff2b..44933c2153df 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -55,7 +55,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *
@@ -179,20 +179,20 @@ index 2c6170b..0eed603 100644
}
testfiles[i].nfound++;
diff --git a/include/wine/port.h b/include/wine/port.h
index e30a744..741cf27 100644
index f90396727d6d..7d2c73887073 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -401,6 +401,8 @@ extern int xattr_fget( int filedes, const char *name, void *value, size_t size )
@@ -371,6 +371,8 @@ extern int xattr_fget( int filedes, const char *name, void *value, size_t size )
extern int xattr_fremove( int filedes, const char *name );
extern int xattr_fset( int filedes, const char *name, void *value, size_t size );
extern int xattr_get( const char *path, const char *name, void *value, size_t size );
+extern int xattr_remove( const char *path, const char *name );
+extern int xattr_set( const char *path, const char *name, void *value, size_t size );
/* Interlocked functions */
#else /* NO_LIBWINE_PORT */
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
index 6918c99..683e7a6 100644
index 6918c9956cc6..683e7a615e2b 100644
--- a/libs/port/xattr.c
+++ b/libs/port/xattr.c
@@ -67,3 +67,23 @@ int xattr_get( const char *path, const char *name, void *value, size_t size )
@@ -220,5 +220,5 @@ index 6918c99..683e7a6 100644
+#endif
+}
--
1.9.1
2.26.2