On Wed, Nov 19, 2008 at 02:48:44PM +0000, Daniel P. Berrange wrote:
On Wed, Nov 19, 2008 at 02:49:01PM +0100, Daniel Veillard wrote:
> On Wed, Nov 19, 2008 at 01:12:55PM +0000, Daniel P. Berrange wrote:
> > This patch is an update of
> Hummm, that change to console code parsing seems rather unrelated,
> isn't it ?
It is needed actually - the old logic was subtley flawed. The original
logic was saying if no serial devices were present, and a console
was specified then make that console look like a serial device. This is
compatability for old mistake where we treated Xen HVM serial console
as a paravirt <console/>. This fixup logic was accidentailly being applied
to all types of domain, when it should only have been applied to HVM
guests. This causes problem with User Mode Linux, where you explicitly
have 0 or more paravirt consoles, and 0 or more serial ports. So my
change here, just restricts the fixup to hvm only.
ah, okay !
> > + for (i = 0 ; i < 16 ; i++) {
> > + char *ret;
> > + if (i == 0 && vm->def->console)
> > + ret = umlBuildCommandLineChr(conn, vm->def->console,
"con");
> > + else
> > + if (asprintf(&ret, "con%d=none", i) < 0)
> > + goto no_memory;
> > + ADD_ARG(ret);
> > + }
> > +
> > + for (i = 0 ; i < 16 ; i++) {
> > + virDomainChrDefPtr chr = NULL;
> > + char *ret;
> > + for (j = 0 ; j < vm->def->nserials ; j++)
> > + if (vm->def->serials[j]->dstPort == i)
> > + chr = vm->def->serials[j];
> > + if (chr)
> > + ret = umlBuildCommandLineChr(conn, chr, "ssl");
> > + else
> > + if (asprintf(&ret, "ssl%d=none", i) < 0)
> > + goto no_memory;
> > + ADD_ARG(ret);
> > + }
>
> I'm a bit puzzled by 16 is that an internal UML limit ?
Yes, thats a hardcoded user mode linux limit.
well, maybe isolate that with a #define at the top of the module then,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/