[libvirt] [PATCH 07/10] Support virDomainOpenConsole with QEMU

Daniel P. Berrange berrange at redhat.com
Tue Nov 2 11:42:54 UTC 2010


On Mon, Nov 01, 2010 at 03:39:30PM -0600, Eric Blake wrote:
> On 11/01/2010 10:12 AM, Daniel P. Berrange wrote:
> > This provides an implementation of the virDomainOpenConsole
> > API with the QEMU driver. For the streams code, this reuses
> > most of the code previously added for the tunnelled migration
> > streams since it is generic.
> > 
> > * src/qemu/qemu_driver.c: Support virDomainOpenConsole
> > ---
> >  src/qemu/qemu_driver.c |   76 +++++++++++++++++++++++++++++++++++++++++++++++-
> >  1 files changed, 75 insertions(+), 1 deletions(-)
> 
> > 
> > +    if (devname) {
> > +        if (vm->def->console &&
> > +            STREQ(devname, vm->def->console->info.alias))
> > +            chr = vm->def->console;
> > +        for (i = 0 ; !chr && i < vm->def->nserials ; i++) {
> > +            if (STREQ(devname, vm->def->serials[i]->info.alias))
> > +                chr = vm->def->serials[i];
> > +        }
> 
> Are we guaranteed that all devices will have a non-NULL and unique
> alias, or do we need to do either of these:

Yes, in QEMU they are all given non-NULL unique aliases.

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list