>be ==
d->backends[d->focus])
So there's no need to add the code for sending events
to the focused frontend because qemu_chr_be_event()
will do that for us.
Signed-off-by: Szymon Lukasz
---
chardev/char-mux.c | 10 --
chardev/char.c | 18 ++
include
Linux implementation, so hopefully there
is no implementation of this functionality conforming to the spec.
Signed-off-by: Szymon Lukasz
Reviewed-by: Michael S. Tsirkin
---
hw/char/trace-events | 1 +
hw/char/virtio-serial-bus.c | 42 +--
hw/core
The managment software can use this command to notify QEMU about the
size of the terminal connected to a chardev, QEMU can then forward this
information to the guest if the chardev is connected to a virtio console
device.
Signed-off-by: Szymon Lukasz
Suggested-by: Daniel P. Berrangé
Add a new chardev event, CHR_EVENT_RESIZE, which a backend should
trigger if detects the size of the connected terminal changed.
Signed-off-by: Szymon Lukasz
---
backends/cryptodev-vhost-user.c | 1 +
chardev/char.c | 1 +
hw/block/vhost-user-blk.c | 1 +
hw/char
Block SIGWINCH, so it is delivered only via signalfd.
Install a handler that uses NotifierList to tell
interested parties about SIGWINCH delivery.
Signed-off-by: Szymon Lukasz
---
include/qemu/main-loop.h | 4
ui/curses.c | 11 ++-
util/main-loop.c | 21
If a virtio serial port is a console port forward terminal resize
messages from the chardev backend to the guest.
Signed-off-by: Szymon Lukasz
---
hw/char/virtio-console.c | 62 +---
1 file changed, 58 insertions(+), 4 deletions(-)
diff --git a/hw/char
Update the terminal size upon SIGWINCH delivery.
Signed-off-by: Szymon Lukasz
---
chardev/char-stdio.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c
index 82eaebc1db..4c3c8a80b6 100644
--- a/chardev/char-stdio.c
This function should be called whenever we learn about a new size of
the terminal connected to a chardev.
Signed-off-by: Szymon Lukasz
---
chardev/char.c | 11 +++
include/chardev/char.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/chardev/char.c b/chardev/char.c
libvirt setting, it will allow to implement a resizable terminal
for virsh console and other libvirt clients.
v3:
add resize messages over QMP, as suggested by Daniel
v2:
fix adding a new virtio feature bit to the virtio console device
Szymon Lukasz (9):
chardev: add cols, rows fields
chardev
-off-by: Szymon Lukasz
---
chardev/char-mux.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 46c44af67c..fa81f8341e 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -247,9 +247,24 @@ void
These fields should be interpreted as the size of the terminal connected
to a given chardev.
Signed-off-by: Szymon Lukasz
---
chardev/char-fe.c | 13 +
include/chardev/char-fe.h | 10 ++
include/chardev/char.h| 1 +
3 files changed, 24 insertions(+)
diff --git
On Wed, Jun 24, 2020 at 12:56:15PM +0100, Daniel P. Berrangé wrote:
> On Wed, Jun 24, 2020 at 01:26:34PM +0200, Szymon Lukasz wrote:
> > In this series resize notifications are only supported for the stdio
> > backend but I think it should be easy to add support for the vc backend.
On Wed, Jun 24, 2020 at 12:49:15PM +0100, Daniel P. Berrangé wrote:
> On Wed, Jun 24, 2020 at 01:26:34PM +0200, Szymon Lukasz wrote:
> > Also there is a problem with the virtio spec and Linux Kernel
> > implementation, the order of fields in virtio_console_resize struct
> >
Linux implementation, so hopefully there
is no implementation of this functionality conforming to the spec.
Signed-off-by: Szymon Lukasz
---
hw/char/trace-events | 1 +
hw/char/virtio-serial-bus.c | 42 +--
hw/core/machine.c | 1
If a virtio serial port is a console port forward terminal resize
messages from the chardev backend to the guest.
Signed-off-by: Szymon Lukasz
---
hw/char/virtio-console.c | 64 +---
1 file changed, 60 insertions(+), 4 deletions(-)
diff --git a/hw/char
Add a new chardev event, CHR_EVENT_RESIZE, which a backend should
trigger if detects the size of the connected terminal changed.
Signed-off-by: Szymon Lukasz
---
backends/cryptodev-vhost-user.c | 1 +
chardev/char.c | 1 +
hw/block/vhost-user-blk.c | 1 +
hw/char
Block SIGWINCH, so it is delivered only via signalfd.
Install a handler that uses NotifierList to tell
interested parties about SIGWINCH delivery.
Signed-off-by: Szymon Lukasz
---
include/qemu/main-loop.h | 4
ui/curses.c | 11 ++-
util/main-loop.c | 21
Implement chr_get_winsize for the stdio backend
and trigger CHR_EVENT_RESIZE upon SIGWINCH delivery.
Signed-off-by: Szymon Lukasz
---
chardev/char-stdio.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c
index
different order than Linux.
v2:
fix adding a new virtio feature bit to the virtio console device
Szymon Lukasz (6):
main-loop: change the handling of SIGWINCH
chardev: add support for retrieving the terminal size
chardev: add support for notifying about terminal resizes
char-stdio: add support
backend connected to some (pseudo)terminal
there is no clean way to detect resizes since SIGWINCH is sent only
for the controlling terminal).
Signed-off-by: Szymon Lukasz
---
chardev/char-fe.c | 11 +++
chardev/char-mux.c| 7 +++
include/chardev/char-fe.h | 11
If a virtio serial port is a console port forward terminal resize
messages from the chardev backend to the guest.
Signed-off-by: Szymon Lukasz
---
hw/char/virtio-console.c | 64 +---
1 file changed, 60 insertions(+), 4 deletions(-)
diff --git a/hw/char
backend connected to some (pseudo)terminal
there is no clean way to detect resizes since SIGWINCH is sent only
for the controlling terminal).
Signed-off-by: Szymon Lukasz
---
chardev/char-fe.c | 11 +++
chardev/char-mux.c| 7 +++
include/chardev/char-fe.h | 11
Implement chr_get_winsize for the stdio backend
and trigger CHR_EVENT_RESIZE upon SIGWINCH delivery.
Signed-off-by: Szymon Lukasz
---
chardev/char-stdio.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c
index
Block SIGWINCH, so it is delivered only via signalfd.
Install a handler that uses NotifierList to tell
interested parties about SIGWINCH delivery.
Signed-off-by: Szymon Lukasz
---
include/qemu/main-loop.h | 4
ui/curses.c | 11 ++-
util/main-loop.c | 21
Linux implementation, so hopefully there
is no implementation of this functionality conforming to the spec.
Signed-off-by: Szymon Lukasz
---
hw/char/trace-events | 1 +
hw/char/virtio-serial-bus.c | 41 +--
include/hw/virtio/virtio-serial.h | 5
Add a new chardev event, CHR_EVENT_RESIZE, which a backend should
trigger if detects the size of the connected terminal changed.
Signed-off-by: Szymon Lukasz
---
backends/cryptodev-vhost-user.c | 1 +
chardev/char.c | 1 +
hw/block/vhost-user-blk.c | 1 +
hw/char
different order than Linux.
Szymon Lukasz (6):
main-loop: change the handling of SIGWINCH
chardev: add support for retrieving the terminal size
chardev: add support for notifying about terminal resizes
char-stdio: add support for the terminal size
virtio-serial-bus: add terminal resize
27 matches
Mail list logo