server: Introduce IOCTL_CONDRV_GET_TITLE ioctl.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-07-15 18:02:26 +02:00 committed by Alexandre Julliard
parent 4ea4289253
commit 037b91620c
2 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#define IOCTL_CONDRV_WRITE_INPUT CTL_CODE(FILE_DEVICE_CONSOLE, 11, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
#define IOCTL_CONDRV_PEEK CTL_CODE(FILE_DEVICE_CONSOLE, 12, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES)
#define IOCTL_CONDRV_GET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 15, METHOD_BUFFERED, FILE_READ_PROPERTIES)
/* console output ioctls */
#define IOCTL_CONDRV_GET_OUTPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 32, METHOD_BUFFERED, FILE_READ_PROPERTIES)

View File

@ -1600,6 +1600,10 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
return set_reply_data( &info, sizeof(info) ) != NULL;
}
case IOCTL_CONDRV_GET_TITLE:
if (!console->title_len) return 1;
return set_reply_data( console->title, min( console->title_len, get_reply_max_size() )) != NULL;
default:
set_error( STATUS_INVALID_HANDLE );
return 0;