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
d8739008
Commit
d8739008
authored
Jul 09, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use separated fd ops for screen_buffer fd object.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eeb1f2b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
8 deletions
+31
-8
console.c
server/console.c
+31
-8
No files found.
server/console.c
View file @
d8739008
...
...
@@ -79,7 +79,6 @@ static void console_input_destroy( struct object *obj );
static
struct
fd
*
console_input_get_fd
(
struct
object
*
obj
);
static
struct
object
*
console_input_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
unsigned
int
sharing
,
unsigned
int
options
);
static
enum
server_fd_type
console_get_fd_type
(
struct
fd
*
fd
);
static
const
struct
object_ops
console_input_ops
=
{
...
...
@@ -104,6 +103,24 @@ static const struct object_ops console_input_ops =
console_input_destroy
/* destroy */
};
static
enum
server_fd_type
console_get_fd_type
(
struct
fd
*
fd
);
static
int
console_input_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
const
struct
fd_ops
console_input_fd_ops
=
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
console_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
no_fd_get_file_info
,
/* get_file_info */
no_fd_get_volume_info
,
/* get_volume_info */
console_input_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
/* reselect_async */
};
static
void
console_input_events_dump
(
struct
object
*
obj
,
int
verbose
);
static
void
console_input_events_destroy
(
struct
object
*
obj
);
static
struct
fd
*
console_input_events_get_fd
(
struct
object
*
obj
);
...
...
@@ -221,9 +238,9 @@ static const struct object_ops screen_buffer_ops =
screen_buffer_destroy
/* destroy */
};
static
int
console
_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
int
screen_buffer
_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
const
struct
fd_ops
console
_fd_ops
=
static
const
struct
fd_ops
screen_buffer
_fd_ops
=
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
...
...
@@ -233,7 +250,7 @@ static const struct fd_ops console_fd_ops =
no_fd_flush
,
/* flush */
no_fd_get_file_info
,
/* get_file_info */
no_fd_get_volume_info
,
/* get_volume_info */
console_ioctl
,
/* ioctl */
screen_buffer_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
/* reselect_async */
};
...
...
@@ -446,12 +463,12 @@ static struct object *create_console_input( struct thread* renderer, int fd )
}
if
(
fd
!=
-
1
)
/* bare console */
{
console_input
->
fd
=
create_anonymous_fd
(
&
console_fd_ops
,
fd
,
&
console_input
->
obj
,
console_input
->
fd
=
create_anonymous_fd
(
&
console_
input_
fd_ops
,
fd
,
&
console_input
->
obj
,
FILE_SYNCHRONOUS_IO_NONALERT
);
}
else
{
console_input
->
fd
=
alloc_pseudo_fd
(
&
console_fd_ops
,
&
console_input
->
obj
,
console_input
->
fd
=
alloc_pseudo_fd
(
&
console_
input_
fd_ops
,
&
console_input
->
obj
,
FILE_SYNCHRONOUS_IO_NONALERT
);
}
if
(
!
console_input
->
fd
)
...
...
@@ -540,7 +557,7 @@ static struct screen_buffer *create_console_output( struct console_input *consol
screen_buffer
->
fd
=
NULL
;
else
{
if
(
!
(
screen_buffer
->
fd
=
create_anonymous_fd
(
&
console
_fd_ops
,
fd
,
&
screen_buffer
->
obj
,
if
(
!
(
screen_buffer
->
fd
=
create_anonymous_fd
(
&
screen_buffer
_fd_ops
,
fd
,
&
screen_buffer
->
obj
,
FILE_SYNCHRONOUS_IO_NONALERT
)))
{
release_object
(
screen_buffer
);
...
...
@@ -1550,7 +1567,7 @@ static void scroll_console_output( struct screen_buffer *screen_buffer, int xsrc
console_input_events_append
(
screen_buffer
->
input
,
&
evt
);
}
static
int
console_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
static
int
console_i
nput_i
octl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
{
struct
console_input
*
console
=
get_fd_user
(
fd
);
...
...
@@ -1615,6 +1632,12 @@ static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async
}
}
static
int
screen_buffer_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
{
set_error
(
STATUS_INVALID_HANDLE
);
return
0
;
}
static
int
console_input_events_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
{
struct
console_input_events
*
evts
=
get_fd_user
(
fd
);
...
...
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