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
36c6a16c
Commit
36c6a16c
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 FilePipeLocalInformation implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
91e4961d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
45 deletions
+51
-45
file.c
dlls/ntdll/file.c
+3
-38
fd.c
server/fd.c
+2
-2
file.h
server/file.h
+2
-2
named_pipe.c
server/named_pipe.c
+44
-3
No files found.
dlls/ntdll/file.c
View file @
36c6a16c
...
...
@@ -2200,6 +2200,8 @@ static NTSTATUS server_get_file_info( HANDLE handle, IO_STATUS_BLOCK *io, void *
io
->
Information
=
wine_server_reply_size
(
reply
);
}
SERVER_END_REQ
;
if
(
io
->
u
.
Status
==
STATUS_OBJECT_TYPE_MISMATCH
)
FIXME
(
"Unsupported info class %x
\n
"
,
info_class
);
return
io
->
u
.
Status
;
}
...
...
@@ -2310,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
!=
FilePipeInformation
&&
class
!=
File
PipeLocalInformation
&&
class
!=
File
AccessInformation
)
if
(
class
!=
FilePipeInformation
&&
class
!=
FileAccessInformation
)
{
if
((
io
->
u
.
Status
=
server_get_unix_fd
(
hFile
,
0
,
&
fd
,
&
needs_close
,
NULL
,
NULL
)))
{
...
...
@@ -2458,43 +2460,6 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
SERVER_END_REQ
;
}
break
;
case
FilePipeLocalInformation
:
{
FILE_PIPE_LOCAL_INFORMATION
*
pli
=
ptr
;
SERVER_START_REQ
(
get_named_pipe_info
)
{
req
->
handle
=
wine_server_obj_handle
(
hFile
);
if
(
!
(
io
->
u
.
Status
=
wine_server_call
(
req
)))
{
pli
->
NamedPipeType
=
(
reply
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_WRITE
)
?
FILE_PIPE_TYPE_MESSAGE
:
FILE_PIPE_TYPE_BYTE
;
switch
(
reply
->
sharing
)
{
case
FILE_SHARE_READ
:
pli
->
NamedPipeConfiguration
=
FILE_PIPE_OUTBOUND
;
break
;
case
FILE_SHARE_WRITE
:
pli
->
NamedPipeConfiguration
=
FILE_PIPE_INBOUND
;
break
;
case
FILE_SHARE_READ
|
FILE_SHARE_WRITE
:
pli
->
NamedPipeConfiguration
=
FILE_PIPE_FULL_DUPLEX
;
break
;
}
pli
->
MaximumInstances
=
reply
->
maxinstances
;
pli
->
CurrentInstances
=
reply
->
instances
;
pli
->
InboundQuota
=
reply
->
insize
;
pli
->
ReadDataAvailable
=
0
;
/* FIXME */
pli
->
OutboundQuota
=
reply
->
outsize
;
pli
->
WriteQuotaAvailable
=
0
;
/* FIXME */
pli
->
NamedPipeState
=
0
;
/* FIXME */
pli
->
NamedPipeEnd
=
(
reply
->
flags
&
NAMED_PIPE_SERVER_END
)
?
FILE_PIPE_SERVER_END
:
FILE_PIPE_CLIENT_END
;
}
}
SERVER_END_REQ
;
}
break
;
case
FileNameInformation
:
{
FILE_NAME_INFORMATION
*
info
=
ptr
;
...
...
server/fd.c
View file @
36c6a16c
...
...
@@ -2170,7 +2170,7 @@ int no_fd_flush( struct fd *fd, struct async *async )
}
/* default get_file_info() routine */
void
no_fd_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
)
void
no_fd_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
}
...
...
@@ -2391,7 +2391,7 @@ DECL_HANDLER(get_file_info)
if
(
fd
)
{
fd
->
fd_ops
->
get_file_info
(
fd
,
req
->
info_class
);
fd
->
fd_ops
->
get_file_info
(
fd
,
req
->
handle
,
req
->
info_class
);
release_object
(
fd
);
}
}
...
...
server/file.h
View file @
36c6a16c
...
...
@@ -63,7 +63,7 @@ struct fd_ops
/* flush the object buffers */
int
(
*
flush
)(
struct
fd
*
,
struct
async
*
);
/* query file info */
void
(
*
get_file_info
)(
struct
fd
*
,
unsigned
int
);
void
(
*
get_file_info
)(
struct
fd
*
,
obj_handle_t
,
unsigned
int
);
/* query volume info */
void
(
*
get_volume_info
)(
struct
fd
*
,
unsigned
int
);
/* perform an ioctl on the file */
...
...
@@ -111,7 +111,7 @@ extern void fd_reselect_async( struct fd *fd, struct async_queue *queue );
extern
int
no_fd_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
int
no_fd_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
int
no_fd_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
extern
void
no_fd_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
extern
void
no_fd_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
);
extern
void
no_fd_get_volume_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
extern
int
no_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
extern
int
default_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
...
...
server/named_pipe.c
View file @
36c6a16c
...
...
@@ -145,7 +145,7 @@ static int pipe_end_write( struct fd *fd, struct async *async_data, file_pos_t p
static
int
pipe_end_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
void
pipe_end_get_volume_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
static
void
pipe_end_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
static
void
pipe_end_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
static
void
pipe_end_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
);
/* server end functions */
static
void
pipe_server_dump
(
struct
object
*
obj
,
int
verbose
);
...
...
@@ -509,7 +509,7 @@ static int pipe_end_flush( struct fd *fd, struct async *async )
return
1
;
}
static
void
pipe_end_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
)
static
void
pipe_end_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
)
{
struct
pipe_end
*
pipe_end
=
get_fd_user
(
fd
);
struct
named_pipe
*
pipe
=
pipe_end
->
pipe
;
...
...
@@ -555,8 +555,49 @@ static void pipe_end_get_file_info( struct fd *fd, unsigned int info_class )
if
(
reply_size
)
memcpy
(
&
name_info
->
FileName
[
1
],
name
,
reply_size
);
break
;
}
case
FilePipeLocalInformation
:
{
FILE_PIPE_LOCAL_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
->
NamedPipeType
=
(
pipe_end
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_WRITE
)
!=
0
;
switch
(
pipe
->
sharing
)
{
case
FILE_SHARE_READ
:
pipe_info
->
NamedPipeConfiguration
=
FILE_PIPE_OUTBOUND
;
break
;
case
FILE_SHARE_WRITE
:
pipe_info
->
NamedPipeConfiguration
=
FILE_PIPE_INBOUND
;
break
;
case
FILE_SHARE_READ
|
FILE_SHARE_WRITE
:
pipe_info
->
NamedPipeConfiguration
=
FILE_PIPE_FULL_DUPLEX
;
break
;
}
pipe_info
->
MaximumInstances
=
pipe
->
maxinstances
;
pipe_info
->
CurrentInstances
=
pipe
->
instances
;
pipe_info
->
InboundQuota
=
pipe
->
insize
;
pipe_info
->
ReadDataAvailable
=
0
;
/* FIXME */
pipe_info
->
OutboundQuota
=
pipe
->
outsize
;
pipe_info
->
WriteQuotaAvailable
=
0
;
/* FIXME */
pipe_info
->
NamedPipeState
=
0
;
/* FIXME */
pipe_info
->
NamedPipeEnd
=
pipe_end
->
obj
.
ops
==
&
pipe_server_ops
?
FILE_PIPE_SERVER_END
:
FILE_PIPE_CLIENT_END
;
break
;
}
default:
no_fd_get_file_info
(
fd
,
info_class
);
no_fd_get_file_info
(
fd
,
handle
,
info_class
);
}
}
...
...
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