]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: add support for VIR_DOMAIN_CONSOLE_* flags
authorPeter Krempa <pkrempa@redhat.com>
Wed, 12 Oct 2011 10:59:15 +0000 (12:59 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Feb 2012 14:05:17 +0000 (15:05 +0100)
commitafa4336e94bce656f04f88276603ce9dbeefeace
tree7fc0f3398cd36a5c31f770939ad7a40b96304864
parenta1801023f4327e7eef4c8c81328a7106efdc789a
virsh: add support for VIR_DOMAIN_CONSOLE_* flags

This patch adds support for the newly introduced
VIR_DOMAIN_CONSOLE_FORCE and VIR_DOMAIN_CONSOLE_SAFE flags. The console
command now has an optional parameter --force that specifies that the
user wants to forcibly interrupt an ongoing console session and create
a new one. Flag --safe requests that the console should be opened only
if the hypervisor driver supports safe console handling.

The behaviour to this point was that the daemon opened two streams to
the console, that competed for data from the pipe, and the result was
that both of the consoles ended up scrambled.

This patch doesn't modify operation of other commands dealing with
console connections (start, create) as those open connections to newly
started domains making it virtually impossible for another client to race
for the console and steal it.

* tools/console.c:
        - add support for flag passthrough
* tools/console.h:
        - modify function prototypes to match impl.
* tools/virsh.c:
        - add flag --force for the console command
tools/console.c
tools/console.h
tools/virsh.c
tools/virsh.pod