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
5f43a1b9
Commit
5f43a1b9
authored
Oct 15, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use pipe_end_get_file_info for FilePipeInformation implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
36c6a16c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
114 deletions
+25
-114
file.c
dlls/ntdll/file.c
+1
-19
server_protocol.h
include/wine/server_protocol.h
+1
-21
named_pipe.c
server/named_pipe.c
+23
-33
protocol.def
server/protocol.def
+0
-12
request.h
server/request.h
+0
-11
trace.c
server/trace.c
+0
-18
No files found.
dlls/ntdll/file.c
View file @
5f43a1b9
...
...
@@ -2312,7 +2312,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
if
(
len
<
info_sizes
[
class
])
return
io
->
u
.
Status
=
STATUS_INFO_LENGTH_MISMATCH
;
if
(
class
!=
File
PipeInformation
&&
class
!=
File
AccessInformation
)
if
(
class
!=
FileAccessInformation
)
{
if
((
io
->
u
.
Status
=
server_get_unix_fd
(
hFile
,
0
,
&
fd
,
&
needs_close
,
NULL
,
NULL
)))
{
...
...
@@ -2442,24 +2442,6 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
}
}
break
;
case
FilePipeInformation
:
{
FILE_PIPE_INFORMATION
*
pi
=
ptr
;
SERVER_START_REQ
(
get_named_pipe_info
)
{
req
->
handle
=
wine_server_obj_handle
(
hFile
);
if
(
!
(
io
->
u
.
Status
=
wine_server_call
(
req
)))
{
pi
->
ReadMode
=
(
reply
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_READ
)
?
FILE_PIPE_MESSAGE_MODE
:
FILE_PIPE_BYTE_STREAM_MODE
;
pi
->
CompletionMode
=
(
reply
->
flags
&
NAMED_PIPE_NONBLOCKING_MODE
)
?
FILE_PIPE_COMPLETE_OPERATION
:
FILE_PIPE_QUEUE_OPERATION
;
}
}
SERVER_END_REQ
;
}
break
;
case
FileNameInformation
:
{
FILE_NAME_INFORMATION
*
info
=
ptr
;
...
...
include/wine/server_protocol.h
View file @
5f43a1b9
...
...
@@ -3419,23 +3419,6 @@ struct create_named_pipe_reply
#define NAMED_PIPE_SERVER_END 0x8000
struct
get_named_pipe_info_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
};
struct
get_named_pipe_info_reply
{
struct
reply_header
__header
;
unsigned
int
flags
;
unsigned
int
sharing
;
unsigned
int
maxinstances
;
unsigned
int
instances
;
unsigned
int
outsize
;
unsigned
int
insize
;
};
struct
set_named_pipe_info_request
{
struct
request_header
__header
;
...
...
@@ -5805,7 +5788,6 @@ enum request
REQ_ioctl
,
REQ_set_irp_result
,
REQ_create_named_pipe
,
REQ_get_named_pipe_info
,
REQ_set_named_pipe_info
,
REQ_create_window
,
REQ_destroy_window
,
...
...
@@ -6102,7 +6084,6 @@ union generic_request
struct
ioctl_request
ioctl_request
;
struct
set_irp_result_request
set_irp_result_request
;
struct
create_named_pipe_request
create_named_pipe_request
;
struct
get_named_pipe_info_request
get_named_pipe_info_request
;
struct
set_named_pipe_info_request
set_named_pipe_info_request
;
struct
create_window_request
create_window_request
;
struct
destroy_window_request
destroy_window_request
;
...
...
@@ -6397,7 +6378,6 @@ union generic_reply
struct
ioctl_reply
ioctl_reply
;
struct
set_irp_result_reply
set_irp_result_reply
;
struct
create_named_pipe_reply
create_named_pipe_reply
;
struct
get_named_pipe_info_reply
get_named_pipe_info_reply
;
struct
set_named_pipe_info_reply
set_named_pipe_info_reply
;
struct
create_window_reply
create_window_reply
;
struct
destroy_window_reply
destroy_window_reply
;
...
...
@@ -6532,6 +6512,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 56
6
#define SERVER_PROTOCOL_VERSION 56
7
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/named_pipe.c
View file @
5f43a1b9
...
...
@@ -555,6 +555,29 @@ static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned
if
(
reply_size
)
memcpy
(
&
name_info
->
FileName
[
1
],
name
,
reply_size
);
break
;
}
case
FilePipeInformation
:
{
FILE_PIPE_INFORMATION
*
pipe_info
;
if
(
!
(
get_handle_access
(
current
->
process
,
handle
)
&
FILE_READ_ATTRIBUTES
))
{
set_error
(
STATUS_ACCESS_DENIED
);
return
;
}
if
(
get_reply_max_size
()
<
sizeof
(
*
pipe_info
))
{
set_error
(
STATUS_INFO_LENGTH_MISMATCH
);
return
;
}
if
(
!
(
pipe_info
=
set_reply_data_size
(
sizeof
(
*
pipe_info
)
)))
return
;
pipe_info
->
ReadMode
=
(
pipe_end
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_READ
)
?
FILE_PIPE_MESSAGE_MODE
:
FILE_PIPE_BYTE_STREAM_MODE
;
pipe_info
->
CompletionMode
=
(
pipe_end
->
flags
&
NAMED_PIPE_NONBLOCKING_MODE
)
?
FILE_PIPE_COMPLETE_OPERATION
:
FILE_PIPE_QUEUE_OPERATION
;
break
;
}
case
FilePipeLocalInformation
:
{
FILE_PIPE_LOCAL_INFORMATION
*
pipe_info
;
...
...
@@ -1320,39 +1343,6 @@ DECL_HANDLER(create_named_pipe)
release_object
(
pipe
);
}
DECL_HANDLER
(
get_named_pipe_info
)
{
struct
pipe_end
*
pipe_end
;
pipe_end
=
(
struct
pipe_end
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
FILE_READ_ATTRIBUTES
,
&
pipe_server_ops
);
if
(
!
pipe_end
)
{
if
(
get_error
()
!=
STATUS_OBJECT_TYPE_MISMATCH
)
return
;
clear_error
();
pipe_end
=
(
struct
pipe_end
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
FILE_READ_ATTRIBUTES
,
&
pipe_client_ops
);
if
(
!
pipe_end
)
return
;
}
if
(
pipe_end
->
pipe
)
{
reply
->
flags
=
pipe_end
->
flags
;
reply
->
sharing
=
pipe_end
->
pipe
->
sharing
;
reply
->
maxinstances
=
pipe_end
->
pipe
->
maxinstances
;
reply
->
instances
=
pipe_end
->
pipe
->
instances
;
reply
->
insize
=
pipe_end
->
pipe
->
insize
;
reply
->
outsize
=
pipe_end
->
pipe
->
outsize
;
if
(
pipe_end
->
obj
.
ops
==
&
pipe_server_ops
)
reply
->
flags
|=
NAMED_PIPE_SERVER_END
;
}
else
set_error
(
STATUS_PIPE_DISCONNECTED
);
release_object
(
pipe_end
);
}
DECL_HANDLER
(
set_named_pipe_info
)
{
struct
pipe_end
*
pipe_end
;
...
...
server/protocol.def
View file @
5f43a1b9
...
...
@@ -2459,18 +2459,6 @@ enum message_type
#define NAMED_PIPE_NONBLOCKING_MODE 0x0004
#define NAMED_PIPE_SERVER_END 0x8000
/* Get named pipe information by handle */
@REQ(get_named_pipe_info)
obj_handle_t handle;
@REPLY
unsigned int flags;
unsigned int sharing;
unsigned int maxinstances;
unsigned int instances;
unsigned int outsize;
unsigned int insize;
@END
/* Set named pipe information by handle */
@REQ(set_named_pipe_info)
obj_handle_t handle;
...
...
server/request.h
View file @
5f43a1b9
...
...
@@ -269,7 +269,6 @@ DECL_HANDLER(write);
DECL_HANDLER
(
ioctl
);
DECL_HANDLER
(
set_irp_result
);
DECL_HANDLER
(
create_named_pipe
);
DECL_HANDLER
(
get_named_pipe_info
);
DECL_HANDLER
(
set_named_pipe_info
);
DECL_HANDLER
(
create_window
);
DECL_HANDLER
(
destroy_window
);
...
...
@@ -565,7 +564,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_ioctl
,
(
req_handler
)
req_set_irp_result
,
(
req_handler
)
req_create_named_pipe
,
(
req_handler
)
req_get_named_pipe_info
,
(
req_handler
)
req_set_named_pipe_info
,
(
req_handler
)
req_create_window
,
(
req_handler
)
req_destroy_window
,
...
...
@@ -1647,15 +1645,6 @@ C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, flags) == 48 );
C_ASSERT
(
sizeof
(
struct
create_named_pipe_request
)
==
56
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_named_pipe_reply
,
handle
)
==
8
);
C_ASSERT
(
sizeof
(
struct
create_named_pipe_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_named_pipe_info_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
flags
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
sharing
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
maxinstances
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
instances
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
outsize
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
insize
)
==
28
);
C_ASSERT
(
sizeof
(
struct
get_named_pipe_info_reply
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_named_pipe_info_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_named_pipe_info_request
,
flags
)
==
16
);
C_ASSERT
(
sizeof
(
struct
set_named_pipe_info_request
)
==
24
);
...
...
server/trace.c
View file @
5f43a1b9
...
...
@@ -3020,21 +3020,6 @@ static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
}
static
void
dump_get_named_pipe_info_request
(
const
struct
get_named_pipe_info_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
}
static
void
dump_get_named_pipe_info_reply
(
const
struct
get_named_pipe_info_reply
*
req
)
{
fprintf
(
stderr
,
" flags=%08x"
,
req
->
flags
);
fprintf
(
stderr
,
", sharing=%08x"
,
req
->
sharing
);
fprintf
(
stderr
,
", maxinstances=%08x"
,
req
->
maxinstances
);
fprintf
(
stderr
,
", instances=%08x"
,
req
->
instances
);
fprintf
(
stderr
,
", outsize=%08x"
,
req
->
outsize
);
fprintf
(
stderr
,
", insize=%08x"
,
req
->
insize
);
}
static
void
dump_set_named_pipe_info_request
(
const
struct
set_named_pipe_info_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
...
...
@@ -4700,7 +4685,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_ioctl_request
,
(
dump_func
)
dump_set_irp_result_request
,
(
dump_func
)
dump_create_named_pipe_request
,
(
dump_func
)
dump_get_named_pipe_info_request
,
(
dump_func
)
dump_set_named_pipe_info_request
,
(
dump_func
)
dump_create_window_request
,
(
dump_func
)
dump_destroy_window_request
,
...
...
@@ -4993,7 +4977,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_ioctl_reply
,
NULL
,
(
dump_func
)
dump_create_named_pipe_reply
,
(
dump_func
)
dump_get_named_pipe_info_reply
,
NULL
,
(
dump_func
)
dump_create_window_reply
,
NULL
,
...
...
@@ -5286,7 +5269,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"ioctl"
,
"set_irp_result"
,
"create_named_pipe"
,
"get_named_pipe_info"
,
"set_named_pipe_info"
,
"create_window"
,
"destroy_window"
,
...
...
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