diff options
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r-- | drivers/char/virtio_console.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index f1fe11a344e9..458d907e3621 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -1194,12 +1194,23 @@ static void handle_control_message(struct ports_device *portdev, | |||
1194 | * have to notify the host first. | 1194 | * have to notify the host first. |
1195 | */ | 1195 | */ |
1196 | break; | 1196 | break; |
1197 | case VIRTIO_CONSOLE_RESIZE: | 1197 | case VIRTIO_CONSOLE_RESIZE: { |
1198 | struct { | ||
1199 | __u16 rows; | ||
1200 | __u16 cols; | ||
1201 | } size; | ||
1202 | |||
1198 | if (!is_console_port(port)) | 1203 | if (!is_console_port(port)) |
1199 | break; | 1204 | break; |
1205 | |||
1206 | memcpy(&size, buf->buf + buf->offset + sizeof(*cpkt), | ||
1207 | sizeof(size)); | ||
1208 | set_console_size(port, size.rows, size.cols); | ||
1209 | |||
1200 | port->cons.hvc->irq_requested = 1; | 1210 | port->cons.hvc->irq_requested = 1; |
1201 | resize_console(port); | 1211 | resize_console(port); |
1202 | break; | 1212 | break; |
1213 | } | ||
1203 | case VIRTIO_CONSOLE_PORT_OPEN: | 1214 | case VIRTIO_CONSOLE_PORT_OPEN: |
1204 | port->host_connected = cpkt->value; | 1215 | port->host_connected = cpkt->value; |
1205 | wake_up_interruptible(&port->waitqueue); | 1216 | wake_up_interruptible(&port->waitqueue); |