Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr Isakov
wine-fonts
Commits
ec7c19f6
Commit
ec7c19f6
authored
Dec 29, 2015
by
Alex Henrie
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr.sys: Do a device check before returning a default serial port name.
Fixes
https://bugs.winehq.org/show_bug.cgi?id=39793
parent
253f6bfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
device.c
dlls/mountmgr.sys/device.c
+1
-1
unixlib.c
dlls/mountmgr.sys/unixlib.c
+22
-0
unixlib.h
dlls/mountmgr.sys/unixlib.h
+1
-0
No files found.
dlls/mountmgr.sys/device.c
View file @
ec7c19f6
...
...
@@ -1865,7 +1865,7 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
UNICODE_STRING
nt_name
,
symlink_name
,
default_name
;
DEVICE_OBJECT
*
dev_obj
;
NTSTATUS
status
;
struct
set_dosdev_symlink_params
params
=
{
dosdevices_path
,
unix_path
};
struct
set_dosdev_symlink_params
params
=
{
dosdevices_path
,
unix_path
,
driver
==
serial_driver
};
/* create DOS device */
if
(
MOUNTMGR_CALL
(
set_dosdev_symlink
,
&
params
))
return
FALSE
;
...
...
dlls/mountmgr.sys/unixlib.c
View file @
ec7c19f6
...
...
@@ -46,6 +46,7 @@
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#include <termios.h>
#include "unixlib.h"
...
...
@@ -268,6 +269,27 @@ static NTSTATUS set_dosdev_symlink( void *args )
char
*
path
;
NTSTATUS
status
=
STATUS_SUCCESS
;
#ifdef linux
/* Serial port device files almost always exist on Linux even if the corresponding serial
* ports don't exist. Do a basic functionality check before advertising a serial port. */
if
(
params
->
serial
)
{
struct
termios
tios
;
int
fd
;
if
((
fd
=
open
(
params
->
dest
,
O_RDONLY
))
==
-
1
)
return
FALSE
;
if
(
tcgetattr
(
fd
,
&
tios
)
==
-
1
)
{
close
(
fd
);
return
FALSE
;
}
close
(
fd
);
}
#endif
if
(
!
(
path
=
get_dosdevices_path
(
params
->
dev
)))
return
STATUS_NO_MEMORY
;
if
(
params
->
dest
&&
params
->
dest
[
0
])
...
...
dlls/mountmgr.sys/unixlib.h
View file @
ec7c19f6
...
...
@@ -75,6 +75,7 @@ struct set_dosdev_symlink_params
{
const
char
*
dev
;
const
char
*
dest
;
BOOL
serial
;
};
struct
get_volume_dos_devices_params
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment