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
737148c5
Commit
737148c5
authored
Apr 17, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add a specific data type for ioctl codes so they can be printed as symbols.
parent
aaf477f2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
8 deletions
+26
-8
server_protocol.h
include/wine/server_protocol.h
+2
-1
fd.c
server/fd.c
+1
-1
file.h
server/file.h
+2
-2
named_pipe.c
server/named_pipe.c
+2
-2
protocol.def
server/protocol.def
+2
-1
trace.c
server/trace.c
+16
-1
make_requests
tools/make_requests
+1
-0
No files found.
include/wine/server_protocol.h
View file @
737148c5
...
...
@@ -21,6 +21,7 @@ typedef unsigned short atom_t;
typedef
unsigned
int
process_id_t
;
typedef
unsigned
int
thread_id_t
;
typedef
unsigned
int
data_size_t
;
typedef
unsigned
int
ioctl_code_t
;
struct
request_header
{
...
...
@@ -2668,7 +2669,7 @@ struct ioctl_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
unsigned
in
t
code
;
ioctl_code_
t
code
;
async_data_t
async
;
/* VARARG(in_data,bytes); */
};
...
...
server/fd.c
View file @
737148c5
...
...
@@ -1855,7 +1855,7 @@ static void unmount_device( struct fd *device_fd )
}
/* default ioctl() routine */
void
default_fd_ioctl
(
struct
fd
*
fd
,
unsigned
in
t
code
,
const
async_data_t
*
async
,
void
default_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_
t
code
,
const
async_data_t
*
async
,
const
void
*
data
,
data_size_t
size
)
{
switch
(
code
)
...
...
server/file.h
View file @
737148c5
...
...
@@ -40,7 +40,7 @@ struct fd_ops
/* get file information */
enum
server_fd_type
(
*
get_fd_type
)(
struct
fd
*
fd
);
/* perform an ioctl on the file */
void
(
*
ioctl
)(
struct
fd
*
fd
,
unsigned
in
t
code
,
const
async_data_t
*
async
,
void
(
*
ioctl
)(
struct
fd
*
fd
,
ioctl_code_
t
code
,
const
async_data_t
*
async
,
const
void
*
data
,
data_size_t
size
);
/* queue an async operation */
void
(
*
queue_async
)(
struct
fd
*
,
const
async_data_t
*
data
,
int
type
,
int
count
);
...
...
@@ -77,7 +77,7 @@ extern void default_poll_event( struct fd *fd, int event );
extern
struct
async
*
fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
);
extern
void
fd_async_wake_up
(
struct
fd
*
fd
,
int
type
,
unsigned
int
status
);
extern
void
fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
void
default_fd_ioctl
(
struct
fd
*
fd
,
unsigned
in
t
code
,
const
async_data_t
*
async
,
extern
void
default_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_
t
code
,
const
async_data_t
*
async
,
const
void
*
data
,
data_size_t
size
);
extern
void
default_fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
);
extern
void
default_fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
...
...
server/named_pipe.c
View file @
737148c5
...
...
@@ -139,7 +139,7 @@ static struct fd *pipe_server_get_fd( struct object *obj );
static
void
pipe_server_destroy
(
struct
object
*
obj
);
static
void
pipe_server_flush
(
struct
fd
*
fd
,
struct
event
**
event
);
static
enum
server_fd_type
pipe_server_get_fd_type
(
struct
fd
*
fd
);
static
void
pipe_server_ioctl
(
struct
fd
*
fd
,
unsigned
in
t
code
,
const
async_data_t
*
async
,
static
void
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_
t
code
,
const
async_data_t
*
async
,
const
void
*
data
,
data_size_t
size
);
static
const
struct
object_ops
pipe_server_ops
=
...
...
@@ -565,7 +565,7 @@ static enum server_fd_type pipe_client_get_fd_type( struct fd *fd )
return
FD_TYPE_PIPE
;
}
static
void
pipe_server_ioctl
(
struct
fd
*
fd
,
unsigned
in
t
code
,
const
async_data_t
*
async
,
static
void
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_
t
code
,
const
async_data_t
*
async
,
const
void
*
data
,
data_size_t
size
)
{
struct
pipe_server
*
server
=
get_fd_user
(
fd
);
...
...
server/protocol.def
View file @
737148c5
...
...
@@ -37,6 +37,7 @@ typedef unsigned short atom_t;
typedef unsigned int process_id_t;
typedef unsigned int thread_id_t;
typedef unsigned int data_size_t;
typedef unsigned int ioctl_code_t;
struct request_header
{
...
...
@@ -1967,7 +1968,7 @@ enum message_type
/* Perform an ioctl on a file */
@REQ(ioctl)
obj_handle_t handle; /* handle to the device */
unsigned in
t code; /* ioctl code */
ioctl_code_
t code; /* ioctl code */
async_data_t async; /* async I/O parameters */
VARARG(in_data,bytes); /* ioctl input data */
@REPLY
...
...
server/trace.c
View file @
737148c5
...
...
@@ -36,6 +36,7 @@
#include "winbase.h"
#include "wincon.h"
#include "winternl.h"
#include "winioctl.h"
#include "file.h"
#include "request.h"
#include "unicode.h"
...
...
@@ -82,6 +83,18 @@ static void dump_char_info( const char_info_t *info )
fprintf
(
stderr
,
"',%04x}"
,
info
->
attr
);
}
static
void
dump_ioctl_code
(
const
ioctl_code_t
*
code
)
{
switch
(
*
code
)
{
#define CASE(c) case c: fputs( #c, stderr ); break
CASE
(
FSCTL_DISMOUNT_VOLUME
);
CASE
(
FSCTL_PIPE_DISCONNECT
);
default:
fprintf
(
stderr
,
"%08x"
,
*
code
);
break
;
#undef CASE
}
}
static
void
dump_apc_call
(
const
apc_call_t
*
call
)
{
fputc
(
'{'
,
stderr
);
...
...
@@ -2391,7 +2404,9 @@ static void dump_cancel_async_request( const struct cancel_async_request *req )
static
void
dump_ioctl_request
(
const
struct
ioctl_request
*
req
)
{
fprintf
(
stderr
,
" handle=%p,"
,
req
->
handle
);
fprintf
(
stderr
,
" code=%08x,"
,
req
->
code
);
fprintf
(
stderr
,
" code="
);
dump_ioctl_code
(
&
req
->
code
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" async="
);
dump_async_data
(
&
req
->
async
);
fprintf
(
stderr
,
","
);
...
...
tools/make_requests
View file @
737148c5
...
...
@@ -46,6 +46,7 @@ my %formats =
"apc_result_t"
=>
"&dump_apc_result"
,
"async_data_t"
=>
"&dump_async_data"
,
"luid_t"
=>
"&dump_luid"
,
"ioctl_code_t"
=>
"&dump_ioctl_code"
,
);
my
@requests
=
();
...
...
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