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
b1e1111d
Commit
b1e1111d
authored
May 03, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't use IRP_MJ_* constants for ntoskrnl.exe communication.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8bce6309
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
101 deletions
+102
-101
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+16
-43
server_protocol.h
include/wine/server_protocol.h
+22
-10
device.c
server/device.c
+23
-21
protocol.def
server/protocol.def
+21
-9
trace.c
server/trace.c
+20
-18
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
b1e1111d
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "wine/port.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdarg.h>
#include <assert.h>
#define NONAMELESSUNION
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define NONAMELESSSTRUCT
...
@@ -860,13 +861,10 @@ static NTSTATUS dispatch_ioctl( const irp_params_t *params, void *in_buff, ULONG
...
@@ -860,13 +861,10 @@ static NTSTATUS dispatch_ioctl( const irp_params_t *params, void *in_buff, ULONG
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
/* This is not a real IRP_MJ_CLEANUP dispatcher. We use it to notify client that server
static
NTSTATUS
dispatch_free
(
const
irp_params_t
*
params
,
void
*
in_buff
,
ULONG
in_size
,
* object associated with kernel object is freed so that we may free it on client side
HANDLE
irp_handle
)
* as well. */
static
NTSTATUS
dispatch_cleanup
(
const
irp_params_t
*
params
,
void
*
in_buff
,
ULONG
in_size
,
HANDLE
irp_handle
)
{
{
void
*
obj
=
wine_server_get_ptr
(
params
->
cleanup
.
obj
);
void
*
obj
=
wine_server_get_ptr
(
params
->
free
.
obj
);
TRACE
(
"freeing %p object
\n
"
,
obj
);
TRACE
(
"freeing %p object
\n
"
,
obj
);
free_kernel_object
(
obj
);
free_kernel_object
(
obj
);
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
...
@@ -875,36 +873,16 @@ static NTSTATUS dispatch_cleanup( const irp_params_t *params, void *in_buff, ULO
...
@@ -875,36 +873,16 @@ static NTSTATUS dispatch_cleanup( const irp_params_t *params, void *in_buff, ULO
typedef
NTSTATUS
(
*
dispatch_func
)(
const
irp_params_t
*
params
,
void
*
in_buff
,
ULONG
in_size
,
typedef
NTSTATUS
(
*
dispatch_func
)(
const
irp_params_t
*
params
,
void
*
in_buff
,
ULONG
in_size
,
HANDLE
irp_handle
);
HANDLE
irp_handle
);
static
const
dispatch_func
dispatch_funcs
[
IRP_MJ_MAXIMUM_FUNCTION
+
1
]
=
static
const
dispatch_func
dispatch_funcs
[]
=
{
{
dispatch_create
,
/* IRP_MJ_CREATE */
NULL
,
/* IRP_CALL_NONE */
NULL
,
/* IRP_MJ_CREATE_NAMED_PIPE */
dispatch_create
,
/* IRP_CALL_CREATE */
dispatch_close
,
/* IRP_MJ_CLOSE */
dispatch_close
,
/* IRP_CALL_CLOSE */
dispatch_read
,
/* IRP_MJ_READ */
dispatch_read
,
/* IRP_CALL_READ */
dispatch_write
,
/* IRP_MJ_WRITE */
dispatch_write
,
/* IRP_CALL_WRITE */
NULL
,
/* IRP_MJ_QUERY_INFORMATION */
dispatch_flush
,
/* IRP_CALL_FLUSH */
NULL
,
/* IRP_MJ_SET_INFORMATION */
dispatch_ioctl
,
/* IRP_CALL_IOCTL */
NULL
,
/* IRP_MJ_QUERY_EA */
dispatch_free
/* IRP_CALL_FREE */
NULL
,
/* IRP_MJ_SET_EA */
dispatch_flush
,
/* IRP_MJ_FLUSH_BUFFERS */
NULL
,
/* IRP_MJ_QUERY_VOLUME_INFORMATION */
NULL
,
/* IRP_MJ_SET_VOLUME_INFORMATION */
NULL
,
/* IRP_MJ_DIRECTORY_CONTROL */
NULL
,
/* IRP_MJ_FILE_SYSTEM_CONTROL */
dispatch_ioctl
,
/* IRP_MJ_DEVICE_CONTROL */
NULL
,
/* IRP_MJ_INTERNAL_DEVICE_CONTROL */
NULL
,
/* IRP_MJ_SHUTDOWN */
NULL
,
/* IRP_MJ_LOCK_CONTROL */
dispatch_cleanup
,
/* IRP_MJ_CLEANUP */
NULL
,
/* IRP_MJ_CREATE_MAILSLOT */
NULL
,
/* IRP_MJ_QUERY_SECURITY */
NULL
,
/* IRP_MJ_SET_SECURITY */
NULL
,
/* IRP_MJ_POWER */
NULL
,
/* IRP_MJ_SYSTEM_CONTROL */
NULL
,
/* IRP_MJ_DEVICE_CHANGE */
NULL
,
/* IRP_MJ_QUERY_QUOTA */
NULL
,
/* IRP_MJ_SET_QUOTA */
NULL
,
/* IRP_MJ_PNP */
};
};
/* helper function to update service status */
/* helper function to update service status */
...
@@ -1012,13 +990,8 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
...
@@ -1012,13 +990,8 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
switch
(
status
)
switch
(
status
)
{
{
case
STATUS_SUCCESS
:
case
STATUS_SUCCESS
:
if
(
irp_params
.
major
>
IRP_MJ_MAXIMUM_FUNCTION
||
!
dispatch_funcs
[
irp_params
.
major
])
assert
(
irp_params
.
type
!=
IRP_CALL_NONE
&&
irp_params
.
type
<
ARRAY_SIZE
(
dispatch_funcs
)
);
{
status
=
dispatch_funcs
[
irp_params
.
type
](
&
irp_params
,
in_buff
,
in_size
,
irp
);
WARN
(
"unsupported request %u
\n
"
,
irp_params
.
major
);
status
=
STATUS_NOT_SUPPORTED
;
break
;
}
status
=
dispatch_funcs
[
irp_params
.
major
](
&
irp_params
,
in_buff
,
in_size
,
irp
);
if
(
status
==
STATUS_SUCCESS
)
if
(
status
==
STATUS_SUCCESS
)
{
{
irp
=
0
;
/* status reported by IoCompleteRequest */
irp
=
0
;
/* status reported by IoCompleteRequest */
...
...
include/wine/server_protocol.h
View file @
b1e1111d
...
@@ -640,12 +640,24 @@ typedef union
...
@@ -640,12 +640,24 @@ typedef union
}
create_thread
;
}
create_thread
;
}
apc_result_t
;
}
apc_result_t
;
enum
irp_type
{
IRP_CALL_NONE
,
IRP_CALL_CREATE
,
IRP_CALL_CLOSE
,
IRP_CALL_READ
,
IRP_CALL_WRITE
,
IRP_CALL_FLUSH
,
IRP_CALL_IOCTL
,
IRP_CALL_FREE
};
typedef
union
typedef
union
{
{
unsigned
int
major
;
enum
irp_type
type
;
struct
struct
{
{
unsigned
int
major
;
enum
irp_type
type
;
unsigned
int
access
;
unsigned
int
access
;
unsigned
int
sharing
;
unsigned
int
sharing
;
unsigned
int
options
;
unsigned
int
options
;
...
@@ -653,13 +665,13 @@ typedef union
...
@@ -653,13 +665,13 @@ typedef union
}
create
;
}
create
;
struct
struct
{
{
unsigned
int
major
;
enum
irp_type
type
;
int
__pad
;
int
__pad
;
client_ptr_t
file
;
client_ptr_t
file
;
}
close
;
}
close
;
struct
struct
{
{
unsigned
int
major
;
enum
irp_type
type
;
unsigned
int
key
;
unsigned
int
key
;
data_size_t
out_size
;
data_size_t
out_size
;
int
__pad
;
int
__pad
;
...
@@ -668,20 +680,20 @@ typedef union
...
@@ -668,20 +680,20 @@ typedef union
}
read
;
}
read
;
struct
struct
{
{
unsigned
int
major
;
enum
irp_type
type
;
unsigned
int
key
;
unsigned
int
key
;
client_ptr_t
file
;
client_ptr_t
file
;
file_pos_t
pos
;
file_pos_t
pos
;
}
write
;
}
write
;
struct
struct
{
{
unsigned
int
major
;
enum
irp_type
type
;
int
__pad
;
int
__pad
;
client_ptr_t
file
;
client_ptr_t
file
;
}
flush
;
}
flush
;
struct
struct
{
{
unsigned
int
major
;
enum
irp_type
type
;
ioctl_code_t
code
;
ioctl_code_t
code
;
data_size_t
out_size
;
data_size_t
out_size
;
int
__pad
;
int
__pad
;
...
@@ -689,10 +701,10 @@ typedef union
...
@@ -689,10 +701,10 @@ typedef union
}
ioctl
;
}
ioctl
;
struct
struct
{
{
unsigned
int
major
;
enum
irp_type
type
;
int
__pad
;
int
__pad
;
client_ptr_t
obj
;
client_ptr_t
obj
;
}
cleanup
;
}
free
;
}
irp_params_t
;
}
irp_params_t
;
...
@@ -6682,6 +6694,6 @@ union generic_reply
...
@@ -6682,6 +6694,6 @@ union generic_reply
struct
resume_process_reply
resume_process_reply
;
struct
resume_process_reply
resume_process_reply
;
};
};
#define SERVER_PROTOCOL_VERSION 58
0
#define SERVER_PROTOCOL_VERSION 58
1
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/device.c
View file @
b1e1111d
...
@@ -460,7 +460,7 @@ static struct object *device_open_file( struct object *obj, unsigned int access,
...
@@ -460,7 +460,7 @@ static struct object *device_open_file( struct object *obj, unsigned int access,
irp_params_t
params
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
create
.
major
=
IRP_MJ
_CREATE
;
params
.
create
.
type
=
IRP_CALL
_CREATE
;
params
.
create
.
access
=
access
;
params
.
create
.
access
=
access
;
params
.
create
.
sharing
=
sharing
;
params
.
create
.
sharing
=
sharing
;
params
.
create
.
options
=
options
;
params
.
create
.
options
=
options
;
...
@@ -512,7 +512,7 @@ static int device_file_close_handle( struct object *obj, struct process *process
...
@@ -512,7 +512,7 @@ static int device_file_close_handle( struct object *obj, struct process *process
file
->
closed
=
1
;
file
->
closed
=
1
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
close
.
major
=
IRP_MJ
_CLOSE
;
params
.
close
.
type
=
IRP_CALL
_CLOSE
;
if
((
irp
=
create_irp
(
file
,
&
params
,
NULL
)))
if
((
irp
=
create_irp
(
file
,
&
params
,
NULL
)))
{
{
...
@@ -542,22 +542,26 @@ static void fill_irp_params( struct device_manager *manager, struct irp_call *ir
...
@@ -542,22 +542,26 @@ static void fill_irp_params( struct device_manager *manager, struct irp_call *ir
{
{
*
params
=
irp
->
params
;
*
params
=
irp
->
params
;
switch
(
params
->
major
)
switch
(
params
->
type
)
{
{
case
IRP_MJ_CLOSE
:
case
IRP_CALL_NONE
:
case
IRP_CALL_CREATE
:
case
IRP_CALL_FREE
:
break
;
case
IRP_CALL_CLOSE
:
params
->
close
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
params
->
close
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
break
;
break
;
case
IRP_
MJ
_READ
:
case
IRP_
CALL
_READ
:
params
->
read
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
params
->
read
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
params
->
read
.
out_size
=
irp
->
iosb
->
out_size
;
params
->
read
.
out_size
=
irp
->
iosb
->
out_size
;
break
;
break
;
case
IRP_
MJ
_WRITE
:
case
IRP_
CALL
_WRITE
:
params
->
write
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
params
->
write
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
break
;
break
;
case
IRP_
MJ_FLUSH_BUFFERS
:
case
IRP_
CALL_FLUSH
:
params
->
flush
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
params
->
flush
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
break
;
break
;
case
IRP_
MJ_DEVICE_CONTRO
L
:
case
IRP_
CALL_IOCT
L
:
params
->
ioctl
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
params
->
ioctl
.
file
=
get_kernel_object_ptr
(
manager
,
&
irp
->
file
->
obj
);
params
->
ioctl
.
out_size
=
irp
->
iosb
->
out_size
;
params
->
ioctl
.
out_size
=
irp
->
iosb
->
out_size
;
break
;
break
;
...
@@ -589,9 +593,9 @@ static int device_file_read( struct fd *fd, struct async *async, file_pos_t pos
...
@@ -589,9 +593,9 @@ static int device_file_read( struct fd *fd, struct async *async, file_pos_t pos
irp_params_t
params
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
read
.
major
=
IRP_MJ
_READ
;
params
.
read
.
type
=
IRP_CALL
_READ
;
params
.
read
.
key
=
0
;
params
.
read
.
key
=
0
;
params
.
read
.
pos
=
pos
;
params
.
read
.
pos
=
pos
;
return
queue_irp
(
file
,
&
params
,
async
);
return
queue_irp
(
file
,
&
params
,
async
);
}
}
...
@@ -601,9 +605,9 @@ static int device_file_write( struct fd *fd, struct async *async, file_pos_t pos
...
@@ -601,9 +605,9 @@ static int device_file_write( struct fd *fd, struct async *async, file_pos_t pos
irp_params_t
params
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
write
.
major
=
IRP_MJ
_WRITE
;
params
.
write
.
type
=
IRP_CALL
_WRITE
;
params
.
write
.
key
=
0
;
params
.
write
.
key
=
0
;
params
.
write
.
pos
=
pos
;
params
.
write
.
pos
=
pos
;
return
queue_irp
(
file
,
&
params
,
async
);
return
queue_irp
(
file
,
&
params
,
async
);
}
}
...
@@ -613,7 +617,7 @@ static int device_file_flush( struct fd *fd, struct async *async )
...
@@ -613,7 +617,7 @@ static int device_file_flush( struct fd *fd, struct async *async )
irp_params_t
params
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
flush
.
major
=
IRP_MJ_FLUSH_BUFFERS
;
params
.
flush
.
type
=
IRP_CALL_FLUSH
;
return
queue_irp
(
file
,
&
params
,
async
);
return
queue_irp
(
file
,
&
params
,
async
);
}
}
...
@@ -623,8 +627,8 @@ static int device_file_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
...
@@ -623,8 +627,8 @@ static int device_file_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
irp_params_t
params
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
ioctl
.
major
=
IRP_MJ_DEVICE_CONTRO
L
;
params
.
ioctl
.
type
=
IRP_CALL_IOCT
L
;
params
.
ioctl
.
code
=
code
;
params
.
ioctl
.
code
=
code
;
return
queue_irp
(
file
,
&
params
,
async
);
return
queue_irp
(
file
,
&
params
,
async
);
}
}
...
@@ -757,9 +761,9 @@ void free_kernel_objects( struct object *obj )
...
@@ -757,9 +761,9 @@ void free_kernel_objects( struct object *obj )
assert
(
!
kernel_object
->
owned
);
assert
(
!
kernel_object
->
owned
);
/* abuse IRP_MJ_CLEANUP to request client to free no longer valid kernel object */
memset
(
&
params
,
0
,
sizeof
(
params
)
);
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
cleanup
.
major
=
IRP_MJ_CLEANUP
;
params
.
free
.
type
=
IRP_CALL_FREE
;
params
.
free
.
obj
=
kernel_object
->
user_ptr
;
if
((
irp
=
create_irp
(
NULL
,
&
params
,
NULL
)))
if
((
irp
=
create_irp
(
NULL
,
&
params
,
NULL
)))
{
{
...
@@ -851,8 +855,6 @@ DECL_HANDLER(get_next_device_request)
...
@@ -851,8 +855,6 @@ DECL_HANDLER(get_next_device_request)
struct
list
*
ptr
;
struct
list
*
ptr
;
struct
iosb
*
iosb
;
struct
iosb
*
iosb
;
reply
->
params
.
major
=
IRP_MJ_MAXIMUM_FUNCTION
+
1
;
if
(
!
(
manager
=
(
struct
device_manager
*
)
get_handle_obj
(
current
->
process
,
req
->
manager
,
if
(
!
(
manager
=
(
struct
device_manager
*
)
get_handle_obj
(
current
->
process
,
req
->
manager
,
0
,
&
device_manager_ops
)))
0
,
&
device_manager_ops
)))
return
;
return
;
...
...
server/protocol.def
View file @
b1e1111d
...
@@ -656,12 +656,24 @@ typedef union
...
@@ -656,12 +656,24 @@ typedef union
} create_thread;
} create_thread;
} apc_result_t;
} apc_result_t;
enum irp_type
{
IRP_CALL_NONE,
IRP_CALL_CREATE,
IRP_CALL_CLOSE,
IRP_CALL_READ,
IRP_CALL_WRITE,
IRP_CALL_FLUSH,
IRP_CALL_IOCTL,
IRP_CALL_FREE
};
typedef union
typedef union
{
{
unsigned int major; /* irp major function
*/
enum irp_type type; /* irp call type
*/
struct
struct
{
{
unsigned int major; /* IRP_MJ
_CREATE */
enum irp_type type; /* IRP_CALL
_CREATE */
unsigned int access; /* access rights */
unsigned int access; /* access rights */
unsigned int sharing; /* sharing flags */
unsigned int sharing; /* sharing flags */
unsigned int options; /* file options */
unsigned int options; /* file options */
...
@@ -669,13 +681,13 @@ typedef union
...
@@ -669,13 +681,13 @@ typedef union
} create;
} create;
struct
struct
{
{
unsigned int major; /* IRP_MJ
_CLOSE */
enum irp_type type; /* IRP_CALL
_CLOSE */
int __pad;
int __pad;
client_ptr_t file; /* opaque ptr for the file object */
client_ptr_t file; /* opaque ptr for the file object */
} close;
} close;
struct
struct
{
{
unsigned int major; /* IRP_MJ
_READ */
enum irp_type type; /* IRP_CALL
_READ */
unsigned int key; /* driver key */
unsigned int key; /* driver key */
data_size_t out_size; /* needed output size */
data_size_t out_size; /* needed output size */
int __pad;
int __pad;
...
@@ -684,20 +696,20 @@ typedef union
...
@@ -684,20 +696,20 @@ typedef union
} read;
} read;
struct
struct
{
{
unsigned int major; /* IRP_MJ
_WRITE */
enum irp_type type; /* IRP_CALL
_WRITE */
unsigned int key; /* driver key */
unsigned int key; /* driver key */
client_ptr_t file; /* opaque ptr for the file object */
client_ptr_t file; /* opaque ptr for the file object */
file_pos_t pos; /* file position */
file_pos_t pos; /* file position */
} write;
} write;
struct
struct
{
{
unsigned int major; /* IRP_MJ_FLUSH_BUFFERS
*/
enum irp_type type; /* IRP_CALL_FLUSH
*/
int __pad;
int __pad;
client_ptr_t file; /* opaque ptr for the file object */
client_ptr_t file; /* opaque ptr for the file object */
} flush;
} flush;
struct
struct
{
{
unsigned int major; /* IRP_MJ_DEVICE_CONTRO
L */
enum irp_type type; /* IRP_CALL_IOCT
L */
ioctl_code_t code; /* ioctl code */
ioctl_code_t code; /* ioctl code */
data_size_t out_size; /* needed output size */
data_size_t out_size; /* needed output size */
int __pad;
int __pad;
...
@@ -705,10 +717,10 @@ typedef union
...
@@ -705,10 +717,10 @@ typedef union
} ioctl;
} ioctl;
struct
struct
{
{
unsigned int major; /* IRP_MJ_DEVICE_CLEANUP
*/
enum irp_type type; /* IRP_CALL_FREE
*/
int __pad;
int __pad;
client_ptr_t obj; /* opaque ptr for the freed object */
client_ptr_t obj; /* opaque ptr for the freed object */
}
cleanup
;
}
free
;
} irp_params_t;
} irp_params_t;
/* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
/* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
...
...
server/trace.c
View file @
b1e1111d
...
@@ -317,49 +317,51 @@ static void dump_async_data( const char *prefix, const async_data_t *data )
...
@@ -317,49 +317,51 @@ static void dump_async_data( const char *prefix, const async_data_t *data )
static
void
dump_irp_params
(
const
char
*
prefix
,
const
irp_params_t
*
data
)
static
void
dump_irp_params
(
const
char
*
prefix
,
const
irp_params_t
*
data
)
{
{
switch
(
data
->
major
)
switch
(
data
->
type
)
{
{
case
IRP_MJ_CREATE
:
case
IRP_CALL_NONE
:
fprintf
(
stderr
,
"%s{major=CREATE,access=%08x,sharing=%08x,options=%08x"
,
fprintf
(
stderr
,
"%s{NONE}"
,
prefix
);
break
;
case
IRP_CALL_CREATE
:
fprintf
(
stderr
,
"%s{CREATE,access=%08x,sharing=%08x,options=%08x"
,
prefix
,
data
->
create
.
access
,
data
->
create
.
sharing
,
data
->
create
.
options
);
prefix
,
data
->
create
.
access
,
data
->
create
.
sharing
,
data
->
create
.
options
);
dump_uint64
(
",device="
,
&
data
->
create
.
device
);
dump_uint64
(
",device="
,
&
data
->
create
.
device
);
fputc
(
'}'
,
stderr
);
fputc
(
'}'
,
stderr
);
break
;
break
;
case
IRP_
MJ
_CLOSE
:
case
IRP_
CALL
_CLOSE
:
fprintf
(
stderr
,
"%s{
major=
CLOSE"
,
prefix
);
fprintf
(
stderr
,
"%s{CLOSE"
,
prefix
);
dump_uint64
(
",file="
,
&
data
->
close
.
file
);
dump_uint64
(
",file="
,
&
data
->
close
.
file
);
fputc
(
'}'
,
stderr
);
fputc
(
'}'
,
stderr
);
break
;
break
;
case
IRP_
MJ
_READ
:
case
IRP_
CALL
_READ
:
fprintf
(
stderr
,
"%s{
major=
READ,key=%08x,out_size=%u"
,
prefix
,
data
->
read
.
key
,
fprintf
(
stderr
,
"%s{READ,key=%08x,out_size=%u"
,
prefix
,
data
->
read
.
key
,
data
->
read
.
out_size
);
data
->
read
.
out_size
);
dump_uint64
(
",pos="
,
&
data
->
read
.
pos
);
dump_uint64
(
",pos="
,
&
data
->
read
.
pos
);
dump_uint64
(
",file="
,
&
data
->
read
.
file
);
dump_uint64
(
",file="
,
&
data
->
read
.
file
);
fputc
(
'}'
,
stderr
);
fputc
(
'}'
,
stderr
);
break
;
break
;
case
IRP_
MJ
_WRITE
:
case
IRP_
CALL
_WRITE
:
fprintf
(
stderr
,
"%s{
major=
WRITE,key=%08x"
,
prefix
,
data
->
write
.
key
);
fprintf
(
stderr
,
"%s{WRITE,key=%08x"
,
prefix
,
data
->
write
.
key
);
dump_uint64
(
",pos="
,
&
data
->
write
.
pos
);
dump_uint64
(
",pos="
,
&
data
->
write
.
pos
);
dump_uint64
(
",file="
,
&
data
->
write
.
file
);
dump_uint64
(
",file="
,
&
data
->
write
.
file
);
fputc
(
'}'
,
stderr
);
fputc
(
'}'
,
stderr
);
break
;
break
;
case
IRP_
MJ_FLUSH_BUFFERS
:
case
IRP_
CALL_FLUSH
:
fprintf
(
stderr
,
"%s{
major=FLUSH_BUFFERS
"
,
prefix
);
fprintf
(
stderr
,
"%s{
FLUSH
"
,
prefix
);
dump_uint64
(
",file="
,
&
data
->
flush
.
file
);
dump_uint64
(
",file="
,
&
data
->
flush
.
file
);
fputc
(
'}'
,
stderr
);
fputc
(
'}'
,
stderr
);
break
;
break
;
case
IRP_
MJ_DEVICE_CONTRO
L
:
case
IRP_
CALL_IOCT
L
:
fprintf
(
stderr
,
"%s{
major=DEVICE_CONTRO
L"
,
prefix
);
fprintf
(
stderr
,
"%s{
IOCT
L"
,
prefix
);
dump_ioctl_code
(
",code="
,
&
data
->
ioctl
.
code
);
dump_ioctl_code
(
",code="
,
&
data
->
ioctl
.
code
);
fprintf
(
stderr
,
",out_size=%u"
,
data
->
ioctl
.
out_size
);
fprintf
(
stderr
,
",out_size=%u"
,
data
->
ioctl
.
out_size
);
dump_uint64
(
",file="
,
&
data
->
ioctl
.
file
);
dump_uint64
(
",file="
,
&
data
->
ioctl
.
file
);
fputc
(
'}'
,
stderr
);
fputc
(
'}'
,
stderr
);
break
;
break
;
case
IRP_MJ_MAXIMUM_FUNCTION
+
1
:
/* invalid */
case
IRP_CALL_FREE
:
fprintf
(
stderr
,
"%s{}"
,
prefix
);
fprintf
(
stderr
,
"%s{FREE"
,
prefix
);
break
;
dump_uint64
(
",obj="
,
&
data
->
free
.
obj
);
default:
fputc
(
'}'
,
stderr
);
fprintf
(
stderr
,
"%s{major=%u}"
,
prefix
,
data
->
major
);
break
;
break
;
}
}
}
}
...
...
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