mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 01:34:47 +00:00
server: Add FileFsDeviceInformation implementation for named pipes.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2ab2f31f18
commit
3f07c6e256
|
@ -1115,25 +1115,21 @@ static void test_volume_info(void)
|
||||||
|
|
||||||
memset( buffer, 0xaa, sizeof(buffer) );
|
memset( buffer, 0xaa, sizeof(buffer) );
|
||||||
status = pNtQueryVolumeInformationFile( read, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation );
|
status = pNtQueryVolumeInformationFile( read, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation );
|
||||||
todo_wine {
|
|
||||||
ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status );
|
ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status );
|
||||||
ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information );
|
ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information );
|
||||||
device_info = (FILE_FS_DEVICE_INFORMATION*)buffer;
|
device_info = (FILE_FS_DEVICE_INFORMATION*)buffer;
|
||||||
ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType );
|
ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType );
|
||||||
ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL),
|
ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL),
|
||||||
"Characteristics = %x\n", device_info->Characteristics );
|
"Characteristics = %x\n", device_info->Characteristics );
|
||||||
}
|
|
||||||
|
|
||||||
memset( buffer, 0xaa, sizeof(buffer) );
|
memset( buffer, 0xaa, sizeof(buffer) );
|
||||||
status = pNtQueryVolumeInformationFile( write, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation );
|
status = pNtQueryVolumeInformationFile( write, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation );
|
||||||
todo_wine {
|
|
||||||
ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status );
|
ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status );
|
||||||
ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information );
|
ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information );
|
||||||
device_info = (FILE_FS_DEVICE_INFORMATION*)buffer;
|
device_info = (FILE_FS_DEVICE_INFORMATION*)buffer;
|
||||||
ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType );
|
ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType );
|
||||||
ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL),
|
ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL),
|
||||||
"Characteristics = %x\n", device_info->Characteristics );
|
"Characteristics = %x\n", device_info->Characteristics );
|
||||||
}
|
|
||||||
|
|
||||||
CloseHandle( read );
|
CloseHandle( read );
|
||||||
CloseHandle( write );
|
CloseHandle( write );
|
||||||
|
|
|
@ -156,6 +156,7 @@ static const struct object_ops named_pipe_ops =
|
||||||
static enum server_fd_type pipe_end_get_fd_type( struct fd *fd );
|
static enum server_fd_type pipe_end_get_fd_type( struct fd *fd );
|
||||||
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 void pipe_end_get_volume_info( struct fd *fd, unsigned int info_class );
|
||||||
static void pipe_end_queue_async( struct fd *fd, struct async *async, int type, int count );
|
static void pipe_end_queue_async( struct fd *fd, struct async *async, int type, int count );
|
||||||
static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue );
|
static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue );
|
||||||
|
|
||||||
|
@ -196,7 +197,7 @@ static const struct fd_ops pipe_server_fd_ops =
|
||||||
pipe_end_read, /* read */
|
pipe_end_read, /* read */
|
||||||
pipe_end_write, /* write */
|
pipe_end_write, /* write */
|
||||||
pipe_server_flush, /* flush */
|
pipe_server_flush, /* flush */
|
||||||
no_fd_get_volume_info, /* get_volume_info */
|
pipe_end_get_volume_info, /* get_volume_info */
|
||||||
pipe_server_ioctl, /* ioctl */
|
pipe_server_ioctl, /* ioctl */
|
||||||
pipe_end_queue_async, /* queue_async */
|
pipe_end_queue_async, /* queue_async */
|
||||||
pipe_end_reselect_async /* reselect_async */
|
pipe_end_reselect_async /* reselect_async */
|
||||||
|
@ -240,7 +241,7 @@ static const struct fd_ops pipe_client_fd_ops =
|
||||||
pipe_end_read, /* read */
|
pipe_end_read, /* read */
|
||||||
pipe_end_write, /* write */
|
pipe_end_write, /* write */
|
||||||
pipe_client_flush, /* flush */
|
pipe_client_flush, /* flush */
|
||||||
no_fd_get_volume_info, /* get_volume_info */
|
pipe_end_get_volume_info, /* get_volume_info */
|
||||||
pipe_client_ioctl, /* ioctl */
|
pipe_client_ioctl, /* ioctl */
|
||||||
pipe_end_queue_async, /* queue_async */
|
pipe_end_queue_async, /* queue_async */
|
||||||
pipe_end_reselect_async /* reselect_async */
|
pipe_end_reselect_async /* reselect_async */
|
||||||
|
@ -685,6 +686,28 @@ static int pipe_client_flush( struct fd *fd, struct async *async )
|
||||||
return use_server_io( pipe_end ) ? pipe_end_flush( pipe_end, async ) : 1;
|
return use_server_io( pipe_end ) ? pipe_end_flush( pipe_end, async ) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void pipe_end_get_volume_info( struct fd *fd, unsigned int info_class )
|
||||||
|
{
|
||||||
|
switch (info_class)
|
||||||
|
{
|
||||||
|
case FileFsDeviceInformation:
|
||||||
|
{
|
||||||
|
static const FILE_FS_DEVICE_INFORMATION device_info =
|
||||||
|
{
|
||||||
|
FILE_DEVICE_NAMED_PIPE,
|
||||||
|
FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL
|
||||||
|
};
|
||||||
|
if (get_reply_max_size() >= sizeof(device_info))
|
||||||
|
set_reply_data( &device_info, sizeof(device_info) );
|
||||||
|
else
|
||||||
|
set_error( STATUS_BUFFER_TOO_SMALL );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
set_error( STATUS_NOT_IMPLEMENTED );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void message_queue_read( struct pipe_end *pipe_end, struct iosb *iosb )
|
static void message_queue_read( struct pipe_end *pipe_end, struct iosb *iosb )
|
||||||
{
|
{
|
||||||
struct pipe_message *message;
|
struct pipe_message *message;
|
||||||
|
|
Loading…
Reference in a new issue