Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
3ad1739b
Commit
3ad1739b
authored
Sep 19, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Create the Afd device.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ba2924a6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
1 deletion
+64
-1
directory.c
server/directory.c
+5
-1
file.h
server/file.h
+1
-0
sock.c
server/sock.c
+58
-0
No files found.
server/directory.c
View file @
3ad1739b
...
...
@@ -373,10 +373,12 @@ void init_directories(void)
static
const
WCHAR
mailslotW
[]
=
{
'M'
,
'a'
,
'i'
,
'l'
,
'S'
,
'l'
,
'o'
,
't'
};
static
const
WCHAR
condrvW
[]
=
{
'C'
,
'o'
,
'n'
,
'D'
,
'r'
,
'v'
};
static
const
WCHAR
nullW
[]
=
{
'N'
,
'u'
,
'l'
,
'l'
};
static
const
WCHAR
afdW
[]
=
{
'A'
,
'f'
,
'd'
};
static
const
struct
unicode_str
named_pipe_str
=
{
named_pipeW
,
sizeof
(
named_pipeW
)};
static
const
struct
unicode_str
mailslot_str
=
{
mailslotW
,
sizeof
(
mailslotW
)};
static
const
struct
unicode_str
condrv_str
=
{
condrvW
,
sizeof
(
condrvW
)};
static
const
struct
unicode_str
null_str
=
{
nullW
,
sizeof
(
nullW
)};
static
const
struct
unicode_str
afd_str
=
{
afdW
,
sizeof
(
afdW
)};
/* events */
static
const
WCHAR
event_low_memW
[]
=
{
'L'
,
'o'
,
'w'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'C'
,
'o'
,
'n'
,
'd'
,
'i'
,
't'
,
'i'
,
'o'
,
'n'
};
...
...
@@ -404,7 +406,7 @@ void init_directories(void)
struct
directory
*
dir_driver
,
*
dir_device
,
*
dir_global
,
*
dir_kernel
;
struct
object
*
link_dosdev
,
*
link_global
,
*
link_nul
,
*
link_pipe
,
*
link_mailslot
;
struct
object
*
link_conin
,
*
link_conout
,
*
link_con
;
struct
object
*
named_pipe_device
,
*
mailslot_device
,
*
null_device
,
*
user_data_mapping
,
*
console_device
;
struct
object
*
named_pipe_device
,
*
mailslot_device
,
*
null_device
,
*
user_data_mapping
,
*
console_device
,
*
socket_device
;
struct
keyed_event
*
keyed_event
;
unsigned
int
i
;
...
...
@@ -422,11 +424,13 @@ void init_directories(void)
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"
);
make_object_static
(
named_pipe_device
);
make_object_static
(
mailslot_device
);
make_object_static
(
null_device
);
make_object_static
(
console_device
);
make_object_static
(
socket_device
);
/* sessions */
create_session
(
0
);
...
...
server/file.h
View file @
3ad1739b
...
...
@@ -179,6 +179,7 @@ extern struct object *create_user_data_mapping( struct object *root, const struc
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_unix_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
const
char
*
unix_path
);
...
...
server/sock.c
View file @
3ad1739b
...
...
@@ -1164,6 +1164,64 @@ static void sock_release_ifchange( struct sock *sock )
}
}
static
struct
object_type
*
socket_device_get_type
(
struct
object
*
obj
);
static
void
socket_device_dump
(
struct
object
*
obj
,
int
verbose
);
static
struct
object
*
socket_device_lookup_name
(
struct
object
*
obj
,
struct
unicode_str
*
name
,
unsigned
int
attr
);
static
struct
object
*
socket_device_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
unsigned
int
sharing
,
unsigned
int
options
);
static
const
struct
object_ops
socket_device_ops
=
{
sizeof
(
struct
object
),
/* size */
socket_device_dump
,
/* dump */
socket_device_get_type
,
/* get_type */
no_add_queue
,
/* add_queue */
NULL
,
/* remove_queue */
NULL
,
/* signaled */
no_satisfied
,
/* satisfied */
no_signal
,
/* signal */
no_get_fd
,
/* get_fd */
default_fd_map_access
,
/* map_access */
default_get_sd
,
/* get_sd */
default_set_sd
,
/* set_sd */
socket_device_lookup_name
,
/* lookup_name */
directory_link_name
,
/* link_name */
default_unlink_name
,
/* unlink_name */
socket_device_open_file
,
/* open_file */
no_kernel_obj_list
,
/* get_kernel_obj_list */
no_close_handle
,
/* close_handle */
no_destroy
/* destroy */
};
static
struct
object_type
*
socket_device_get_type
(
struct
object
*
obj
)
{
static
const
WCHAR
name
[]
=
{
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
};
static
const
struct
unicode_str
str
=
{
name
,
sizeof
(
name
)
};
return
get_object_type
(
&
str
);
}
static
void
socket_device_dump
(
struct
object
*
obj
,
int
verbose
)
{
fputs
(
"Socket device
\n
"
,
stderr
);
}
static
struct
object
*
socket_device_lookup_name
(
struct
object
*
obj
,
struct
unicode_str
*
name
,
unsigned
int
attr
)
{
return
NULL
;
}
static
struct
object
*
socket_device_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
unsigned
int
sharing
,
unsigned
int
options
)
{
set_error
(
STATUS_NOT_IMPLEMENTED
);
return
NULL
;
}
struct
object
*
create_socket_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
)
{
return
create_named_object
(
root
,
&
socket_device_ops
,
name
,
0
,
NULL
);
}
/* create a socket */
DECL_HANDLER
(
create_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