Rebase against f374e9ccc8c9b9933520d006b879495bde4e7bb3.

This commit is contained in:
Alistair Leslie-Hughes 2021-11-30 10:55:25 +11:00
parent edb3417124
commit 65ca056d29
4 changed files with 39 additions and 30 deletions

View File

@ -1,22 +1,21 @@
From eb3264141add0ad12a6774b6ee10ba459e2a71e0 Mon Sep 17 00:00:00 2001
From 6a6d039719ed3867b0fdfe8d750e260de0f29628 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Sat, 12 Dec 2020 17:28:31 -0700
Subject: [PATCH] kernel32: Advertise junction point support.
---
dlls/mountmgr.sys/device.c | 82 +++++++++++++++++++++++++++++++++++++-
dlls/mountmgr.sys/device.c | 81 +++++++++++++++++++++++++++++++++++++-
dlls/ntdll/tests/file.c | 9 ++++-
2 files changed, 87 insertions(+), 4 deletions(-)
2 files changed, 87 insertions(+), 3 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 2be8d8cfab6..fc32b57cf70 100644
index d4f77012bbe..77577910103 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -28,7 +28,21 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
-#include <sys/types.h>
@@ -23,6 +23,21 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
+#endif
@ -35,7 +34,7 @@ index 2be8d8cfab6..fc32b57cf70 100644
#define NONAMELESSUNION
@@ -1654,6 +1668,69 @@ static NTSTATUS query_property( struct disk_device *device, IRP *irp )
@@ -1615,6 +1630,69 @@ static NTSTATUS query_property( struct disk_device *device, IRP *irp )
return status;
}
@ -105,16 +104,16 @@ index 2be8d8cfab6..fc32b57cf70 100644
static NTSTATUS WINAPI harddisk_query_volume( DEVICE_OBJECT *device, IRP *irp )
{
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
@@ -1742,7 +1819,8 @@ static NTSTATUS WINAPI harddisk_query_volume( DEVICE_OBJECT *device, IRP *irp )
memcpy(info->FileSystemName, fat32W, info->FileSystemNameLength);
@@ -1695,7 +1773,8 @@ static NTSTATUS WINAPI harddisk_query_volume( DEVICE_OBJECT *device, IRP *irp )
break;
default:
fsname = L"NTFS";
- info->FileSystemAttributes = FILE_CASE_PRESERVED_NAMES | FILE_PERSISTENT_ACLS;
+ info->FileSystemAttributes = FILE_CASE_PRESERVED_NAMES | FILE_PERSISTENT_ACLS
+ | get_fs_flags( volume );
info->MaximumComponentNameLength = 255;
info->FileSystemNameLength = min( sizeof(ntfsW), length - offsetof( FILE_FS_ATTRIBUTE_INFORMATION, FileSystemName ) );
memcpy(info->FileSystemName, ntfsW, info->FileSystemNameLength);
break;
}
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index c5b3b83802e..084398ba83d 100644
--- a/dlls/ntdll/tests/file.c

View File

@ -1,4 +1,4 @@
From effd494310c2ba0e003ec81182a0e456e34a8aee Mon Sep 17 00:00:00 2001
From e5652dcb913e0bf956c5ed4b0d1e1755c58714c5 Mon Sep 17 00:00:00 2001
From: Alex Henrie <alexhenrie24@gmail.com>
Date: Tue, 29 Dec 2015 00:48:02 -0700
Subject: [PATCH] mountmgr.sys: Do a device check before returning a default
@ -6,26 +6,38 @@ Subject: [PATCH] mountmgr.sys: Do a device check before returning a default
Fixes https://bugs.winehq.org/show_bug.cgi?id=39793
---
dlls/mountmgr.sys/device.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
dlls/mountmgr.sys/device.c | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 199f3e90846..56ca6af4cd9 100644
index 332f390550d..666bdb12e6b 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -27,6 +27,9 @@
@@ -23,6 +23,11 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
+#include <fcntl.h>
+#include <unistd.h>
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#endif
#include <sys/time.h>
#ifdef HAVE_SYS_STATFS_H
# include <sys/statfs.h>
@@ -1994,6 +1997,32 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
#endif
@@ -1918,9 +1923,6 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
NTSTATUS status;
struct set_dosdev_symlink_params params = { dosdevices_path, unix_path };
sprintfW( dos_name, dos_name_format, n );
- /* create DOS device */
- if (MOUNTMGR_CALL( set_dosdev_symlink, &params )) return FALSE;
-
if (driver == serial_driver)
{
dos_name_format = L"COM%u";
@@ -1940,6 +1942,30 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
swprintf( dos_name, ARRAY_SIZE(dos_name), dos_name_format, n );
+#ifdef linux
+ /* Serial port device files almost always exist on Linux even if the corresponding serial
@ -49,12 +61,10 @@ index 199f3e90846..56ca6af4cd9 100644
+#endif
+
+ /* create DOS device */
+ unlink( dosdevices_path );
+ if (symlink( unix_path, dosdevices_path ) != 0)
+ return FALSE;
+ if (MOUNTMGR_CALL( set_dosdev_symlink, &params )) return FALSE;
+
/* create NT device */
sprintfW( nt_buffer, nt_name_format, n - 1 );
swprintf( nt_buffer, ARRAY_SIZE(nt_buffer), nt_name_format, n - 1 );
RtlInitUnicodeString( &nt_name, nt_buffer );
--
2.33.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "f03933fbb73152c7a54383fba411a611af7aaa55"
echo "f374e9ccc8c9b9933520d006b879495bde4e7bb3"
}
# Show version information

View File

@ -1 +1 @@
f03933fbb73152c7a54383fba411a611af7aaa55
f374e9ccc8c9b9933520d006b879495bde4e7bb3