[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] libxl: load on FreeBSD



  Martin Kletzander wrote:

> On Sat, May 23, 2015 at 09:15:08PM +0300, Roman Bogorodskiy wrote:
> >The libxl tries to check if it's running in dom0 by parsing
> >/proc/xen/capabilities and if that fails it doesn't load.
> >
> >There's no procfs interface in Xen on FreeBSD, so this check always
> >fails.
> >
> >Instead of using procfs, check if /dev/xen/xenstored, that's enough to
> >check if we're running in dom0 in FreeBSD case.
> >
> >--
> >
> >The 'HYPERVISOR_CAPABILITIES' name could be misleading now, however, I'd
> >prefer to use a common variable to avoid duplicating of the file checking
> >code. Maybe it should be renamed to something like HYPERVISOR_CONTROL?
> 
> You can just add new one, XENSTORED for example, and check whether at
> least one exists, reading the file afterwards if it is the old one.
> It might not be FreeBSD-specific.  What's your opinion?

My concern was doing a check that will always fail on FreeBSD. Anyway,
the check doesn't seem to be very expensive and happens only once, so it
doesn't make any noticeable impact.

I've sent v2. I hope it doesn't break existing behaviour on Linux.

Roman Bogorodskiy

Attachment: pgppYJ2Ry6Zv5.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]