[libvirt] [PATCH] Add support for multiple serial ports into the Xen driver

Michal Novotny minovotn at redhat.com
Fri Feb 18 08:15:11 UTC 2011


On 02/17/2011 08:58 PM, Eric Blake wrote:
> On 02/17/2011 02:37 AM, Michal Novotny wrote:
>> Eric, thanks for reply but I'm having some issues now...
>>
>> I've pulled libvirt sources from upstream and I'm unable to compile it
>> since it keeps saying following:
>>
>>    CCLD   libvirt_parthelper
>> ./.libs/libvirt_util.a(libvirt_util_la-util.o): In function
>> `virFileOperationNoFork':
>> /home/mig/Work/virt-related/libvirt/src/util/util.c:1363: undefined
>> reference to `rpl_open'
> Huh.  rpl_open is a gnulib replacement for open(); I'm not sure why
> gnulib thinks open() needs replacing on Linux (unless it is trying to
> provide O_CLOEXEC support for older kernels).  Was this an incremental
> build, where you had already built before updating to the latest
> libvirt.git, and just typed 'make'?
>
> Can you try 'rm gnulib/lib/fcntl.h', then 'make', to see if it clears up
> the issue?  If it doesn't, then maybe you'll have to resort to a
> full-blown clean checkout.
>

I have already solved this one by `make maintainer-clean` which cloned 
the gnulib again.

>> Unfortunately I was unable to find definition of 'rpl_open' function
>> using git grep so I don't really know what to do there. Some bug or do I
>> miss something?
> It's defined by gnulib, which is copied into place from the gnulib.git
> submodule during ./autogen.sh (and not under libvirt.git's control).
> Even then, it only exists in the replacement<fcntl.h>  header provided
> by gnulib when gnulib thinks that open() isn't up to snuff with POSIX
> requirements.


OK

>> Basically I don't know what you mean by this. Also, when I was defining
>> XMLs I saw that the console node copies the first serial node however
>> how to define it if first serial node is just none?
>>
>> I mean the XML is like:
>>
>> <serial type='dev'>
>> <source path='/dev/ttyS0'/>
>> <target port='0'/>
>> </serial>
>> <serial type='dev'>
>> <source path='/dev/ttyS1'/>
>> <target port='1'/>
>> </serial>
>> <console type='dev'>
>> <source path='/dev/ttyS0'/>
>> <target port='0'/>
>> </console>
>>
>> But what should the XML part be for case of first serial device to be
>> none ?
> I think the key is the<target port='1'/>.  You don't need any
> placeholder in the XML for a missing port 0, but you do need it in the
> xm format where port is implied by position.  That is:
>
> <devices>
>    <serial type='dev'>
>      <source path='/dev/ttyS1'/>
>      <target port='1'/>
>    </serial>
> </devices>
>
> should be sufficient XML to mark that you want to use multi-serial xen
> support, and that you are explicitly leaving virtual port 0 unoccupied
> and plugging in your one serial device into virtual port 1; mapping to:
>
> serial = [ "none", "/dev/ttyS1" ]
>
> in the xm file.  The sexpr rationale should be the same.
>

Ah, ok, sounds good. Thanks!

Michal


-- 
Michal Novotny<minovotn at redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat




More information about the libvir-list mailing list