Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
wine
wine-cw
Commits
5c4d6cf8
Commit
5c4d6cf8
authored
Sep 23, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Pass all creation arguments to the device creation functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1a7b256f
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
21 deletions
+30
-21
console.c
server/console.c
+3
-2
device.c
server/device.c
+2
-1
directory.c
server/directory.c
+5
-5
file.h
server/file.h
+9
-5
mailslot.c
server/mailslot.c
+3
-2
mapping.c
server/mapping.c
+2
-2
named_pipe.c
server/named_pipe.c
+3
-2
sock.c
server/sock.c
+3
-2
No files found.
server/console.c
View file @
5c4d6cf8
...
...
@@ -2540,9 +2540,10 @@ static struct object *console_device_open_file( struct object *obj, unsigned int
return
is_output
?
grab_object
(
current
->
process
->
console
->
active
)
:
grab_object
(
current
->
process
->
console
);
}
struct
object
*
create_console_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
)
struct
object
*
create_console_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
)
{
return
create_named_object
(
root
,
&
console_device_ops
,
name
,
0
,
NULL
);
return
create_named_object
(
root
,
&
console_device_ops
,
name
,
attr
,
sd
);
}
/* allocate a console for the renderer */
...
...
server/device.c
View file @
5c4d6cf8
...
...
@@ -720,11 +720,12 @@ static struct device *create_device( struct object *root, const struct unicode_s
}
struct
object
*
create_unix_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
,
const
char
*
unix_path
)
{
struct
device
*
device
;
if
((
device
=
create_named_object
(
root
,
&
device_ops
,
name
,
0
,
NULL
)))
if
((
device
=
create_named_object
(
root
,
&
device_ops
,
name
,
attr
,
sd
)))
{
device
->
unix_path
=
strdup
(
unix_path
);
device
->
manager
=
NULL
;
/* no manager, requests go straight to the Unix device */
...
...
server/directory.c
View file @
5c4d6cf8
...
...
@@ -423,11 +423,11 @@ void init_directories(void)
make_object_static
(
&
dir_objtype
->
obj
);
/* devices */
named_pipe_device
=
create_named_pipe_device
(
&
dir_device
->
obj
,
&
named_pipe_str
);
mailslot_device
=
create_mailslot_device
(
&
dir_device
->
obj
,
&
mailslot_str
);
console_device
=
create_console_device
(
&
dir_device
->
obj
,
&
condrv_str
);
socket_device
=
create_socket_device
(
&
dir_device
->
obj
,
&
afd_str
);
null_device
=
create_unix_device
(
&
dir_device
->
obj
,
&
null_str
,
"/dev/null"
);
named_pipe_device
=
create_named_pipe_device
(
&
dir_device
->
obj
,
&
named_pipe_str
,
0
,
NULL
);
mailslot_device
=
create_mailslot_device
(
&
dir_device
->
obj
,
&
mailslot_str
,
0
,
NULL
);
console_device
=
create_console_device
(
&
dir_device
->
obj
,
&
condrv_str
,
0
,
NULL
);
socket_device
=
create_socket_device
(
&
dir_device
->
obj
,
&
afd_str
,
0
,
NULL
);
null_device
=
create_unix_device
(
&
dir_device
->
obj
,
&
null_str
,
0
,
NULL
,
"/dev/null"
);
make_object_static
(
named_pipe_device
);
make_object_static
(
mailslot_device
);
make_object_static
(
null_device
);
...
...
server/file.h
View file @
5c4d6cf8
...
...
@@ -176,12 +176,16 @@ extern struct object *create_user_data_mapping( struct object *root, const struc
/* device functions */
extern
struct
object
*
create_named_pipe_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
);
extern
struct
object
*
create_mailslot_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
);
extern
struct
object
*
create_console_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
);
extern
struct
object
*
create_socket_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
);
extern
struct
object
*
create_named_pipe_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
);
extern
struct
object
*
create_mailslot_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
);
extern
struct
object
*
create_console_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
);
extern
struct
object
*
create_socket_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
);
extern
struct
object
*
create_unix_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
const
char
*
unix_path
);
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
,
const
char
*
unix_path
);
/* change notification functions */
...
...
server/mailslot.c
View file @
5c4d6cf8
...
...
@@ -433,11 +433,12 @@ static void mailslot_device_destroy( struct object *obj )
free
(
device
->
mailslots
);
}
struct
object
*
create_mailslot_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
)
struct
object
*
create_mailslot_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
)
{
struct
mailslot_device
*
dev
;
if
((
dev
=
create_named_object
(
root
,
&
mailslot_device_ops
,
name
,
0
,
NULL
))
&&
if
((
dev
=
create_named_object
(
root
,
&
mailslot_device_ops
,
name
,
attr
,
sd
))
&&
get_error
()
!=
STATUS_OBJECT_NAME_EXISTS
)
{
dev
->
mailslots
=
NULL
;
...
...
server/mapping.c
View file @
5c4d6cf8
...
...
@@ -964,8 +964,8 @@ struct object *create_user_data_mapping( struct object *root, const struct unico
void
*
ptr
;
struct
mapping
*
mapping
;
if
(
!
(
mapping
=
create_mapping
(
root
,
name
,
OBJ_OPENIF
,
sizeof
(
KSHARED_USER_DATA
),
SEC_COMMIT
,
0
,
FILE_READ_DATA
|
FILE_WRITE_DATA
,
NULL
)))
return
NULL
;
if
(
!
(
mapping
=
create_mapping
(
root
,
name
,
attr
,
sizeof
(
KSHARED_USER_DATA
),
SEC_COMMIT
,
0
,
FILE_READ_DATA
|
FILE_WRITE_DATA
,
sd
)))
return
NULL
;
ptr
=
mmap
(
NULL
,
mapping
->
size
,
PROT_WRITE
,
MAP_SHARED
,
get_unix_fd
(
mapping
->
fd
),
0
);
if
(
ptr
!=
MAP_FAILED
)
{
...
...
server/named_pipe.c
View file @
5c4d6cf8
...
...
@@ -507,11 +507,12 @@ static void named_pipe_device_destroy( struct object *obj )
free
(
device
->
pipes
);
}
struct
object
*
create_named_pipe_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
)
struct
object
*
create_named_pipe_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
)
{
struct
named_pipe_device
*
dev
;
if
((
dev
=
create_named_object
(
root
,
&
named_pipe_device_ops
,
name
,
0
,
NULL
))
&&
if
((
dev
=
create_named_object
(
root
,
&
named_pipe_device_ops
,
name
,
attr
,
sd
))
&&
get_error
()
!=
STATUS_OBJECT_NAME_EXISTS
)
{
dev
->
pipes
=
NULL
;
...
...
server/sock.c
View file @
5c4d6cf8
...
...
@@ -1247,9 +1247,10 @@ static struct object *socket_device_open_file( struct object *obj, unsigned int
return
&
sock
->
obj
;
}
struct
object
*
create_socket_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
)
struct
object
*
create_socket_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
)
{
return
create_named_object
(
root
,
&
socket_device_ops
,
name
,
0
,
NULL
);
return
create_named_object
(
root
,
&
socket_device_ops
,
name
,
attr
,
sd
);
}
/* accept a socket */
...
...
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