server: Return the device name for named pipe files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7b79c8059d
commit
bdb2fe0cad
|
@ -1443,7 +1443,7 @@ static void test_query_object(void)
|
||||||
1, 1000, 1000, 1000, NULL );
|
1, 1000, 1000, 1000, NULL );
|
||||||
ok( handle != INVALID_HANDLE_VALUE, "CreateNamedPipe failed err %u\n", GetLastError() );
|
ok( handle != INVALID_HANDLE_VALUE, "CreateNamedPipe failed err %u\n", GetLastError() );
|
||||||
|
|
||||||
test_object_name( handle, L"\\Device\\NamedPipe\\test_pipe", TRUE );
|
test_object_name( handle, L"\\Device\\NamedPipe\\test_pipe", FALSE );
|
||||||
test_object_type( handle, L"File" );
|
test_object_type( handle, L"File" );
|
||||||
test_file_info( handle );
|
test_file_info( handle );
|
||||||
|
|
||||||
|
@ -1460,7 +1460,7 @@ static void test_query_object(void)
|
||||||
handle = CreateFileA( "\\\\.\\pipe", 0, 0, NULL, OPEN_EXISTING, 0, 0 );
|
handle = CreateFileA( "\\\\.\\pipe", 0, 0, NULL, OPEN_EXISTING, 0, 0 );
|
||||||
ok( handle != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() );
|
ok( handle != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() );
|
||||||
|
|
||||||
test_object_name( handle, L"\\Device\\NamedPipe", TRUE );
|
test_object_name( handle, L"\\Device\\NamedPipe", FALSE );
|
||||||
test_object_type( handle, L"File" );
|
test_object_type( handle, L"File" );
|
||||||
test_file_info( handle );
|
test_file_info( handle );
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,7 @@ static struct fd *pipe_end_get_fd( struct object *obj );
|
||||||
static struct security_descriptor *pipe_end_get_sd( struct object *obj );
|
static struct security_descriptor *pipe_end_get_sd( struct object *obj );
|
||||||
static int pipe_end_set_sd( struct object *obj, const struct security_descriptor *sd,
|
static int pipe_end_set_sd( struct object *obj, const struct security_descriptor *sd,
|
||||||
unsigned int set_info );
|
unsigned int set_info );
|
||||||
|
static WCHAR *pipe_end_get_full_name( struct object *obj, data_size_t *len );
|
||||||
static int pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos );
|
static int pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos );
|
||||||
static int pipe_end_write( struct fd *fd, struct async *async_data, file_pos_t pos );
|
static int pipe_end_write( struct fd *fd, struct async *async_data, file_pos_t pos );
|
||||||
static int pipe_end_flush( struct fd *fd, struct async *async );
|
static int pipe_end_flush( struct fd *fd, struct async *async );
|
||||||
|
@ -167,7 +168,7 @@ static const struct object_ops pipe_server_ops =
|
||||||
default_fd_map_access, /* map_access */
|
default_fd_map_access, /* map_access */
|
||||||
pipe_end_get_sd, /* get_sd */
|
pipe_end_get_sd, /* get_sd */
|
||||||
pipe_end_set_sd, /* set_sd */
|
pipe_end_set_sd, /* set_sd */
|
||||||
no_get_full_name, /* get_full_name */
|
pipe_end_get_full_name, /* get_full_name */
|
||||||
no_lookup_name, /* lookup_name */
|
no_lookup_name, /* lookup_name */
|
||||||
no_link_name, /* link_name */
|
no_link_name, /* link_name */
|
||||||
NULL, /* unlink_name */
|
NULL, /* unlink_name */
|
||||||
|
@ -210,7 +211,7 @@ static const struct object_ops pipe_client_ops =
|
||||||
default_fd_map_access, /* map_access */
|
default_fd_map_access, /* map_access */
|
||||||
pipe_end_get_sd, /* get_sd */
|
pipe_end_get_sd, /* get_sd */
|
||||||
pipe_end_set_sd, /* set_sd */
|
pipe_end_set_sd, /* set_sd */
|
||||||
no_get_full_name, /* get_full_name */
|
pipe_end_get_full_name, /* get_full_name */
|
||||||
no_lookup_name, /* lookup_name */
|
no_lookup_name, /* lookup_name */
|
||||||
no_link_name, /* link_name */
|
no_link_name, /* link_name */
|
||||||
NULL, /* unlink_name */
|
NULL, /* unlink_name */
|
||||||
|
@ -269,6 +270,7 @@ static const struct object_ops named_pipe_device_ops =
|
||||||
|
|
||||||
static void named_pipe_device_file_dump( struct object *obj, int verbose );
|
static void named_pipe_device_file_dump( struct object *obj, int verbose );
|
||||||
static struct fd *named_pipe_device_file_get_fd( struct object *obj );
|
static struct fd *named_pipe_device_file_get_fd( struct object *obj );
|
||||||
|
static WCHAR *named_pipe_device_file_get_full_name( struct object *obj, data_size_t *len );
|
||||||
static int named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
|
static int named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
|
||||||
static enum server_fd_type named_pipe_device_file_get_fd_type( struct fd *fd );
|
static enum server_fd_type named_pipe_device_file_get_fd_type( struct fd *fd );
|
||||||
static void named_pipe_device_file_destroy( struct object *obj );
|
static void named_pipe_device_file_destroy( struct object *obj );
|
||||||
|
@ -287,7 +289,7 @@ static const struct object_ops named_pipe_device_file_ops =
|
||||||
default_fd_map_access, /* map_access */
|
default_fd_map_access, /* map_access */
|
||||||
default_get_sd, /* get_sd */
|
default_get_sd, /* get_sd */
|
||||||
default_set_sd, /* set_sd */
|
default_set_sd, /* set_sd */
|
||||||
no_get_full_name, /* get_full_name */
|
named_pipe_device_file_get_full_name, /* get_full_name */
|
||||||
no_lookup_name, /* lookup_name */
|
no_lookup_name, /* lookup_name */
|
||||||
no_link_name, /* link_name */
|
no_link_name, /* link_name */
|
||||||
NULL, /* unlink_name */
|
NULL, /* unlink_name */
|
||||||
|
@ -535,6 +537,12 @@ static struct fd *named_pipe_device_file_get_fd( struct object *obj )
|
||||||
return (struct fd *)grab_object( file->fd );
|
return (struct fd *)grab_object( file->fd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WCHAR *named_pipe_device_file_get_full_name( struct object *obj, data_size_t *len )
|
||||||
|
{
|
||||||
|
struct named_pipe_device_file *file = (struct named_pipe_device_file *)obj;
|
||||||
|
return file->device->obj.ops->get_full_name( &file->device->obj, len );
|
||||||
|
}
|
||||||
|
|
||||||
static enum server_fd_type named_pipe_device_file_get_fd_type( struct fd *fd )
|
static enum server_fd_type named_pipe_device_file_get_fd_type( struct fd *fd )
|
||||||
{
|
{
|
||||||
return FD_TYPE_DEVICE;
|
return FD_TYPE_DEVICE;
|
||||||
|
@ -704,6 +712,12 @@ static int pipe_end_set_sd( struct object *obj, const struct security_descriptor
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WCHAR *pipe_end_get_full_name( struct object *obj, data_size_t *len )
|
||||||
|
{
|
||||||
|
struct pipe_end *pipe_end = (struct pipe_end *) obj;
|
||||||
|
return pipe_end->pipe->obj.ops->get_full_name( &pipe_end->pipe->obj, len );
|
||||||
|
}
|
||||||
|
|
||||||
static void pipe_end_get_volume_info( struct fd *fd, unsigned int info_class )
|
static void pipe_end_get_volume_info( struct fd *fd, unsigned int info_class )
|
||||||
{
|
{
|
||||||
switch (info_class)
|
switch (info_class)
|
||||||
|
|
Loading…
Reference in New Issue