WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] libxl: blktap2 portiblity fixes

On Monday 26 July 2010 17:12:34 Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: blktap2 portiblity 
fixes"):
> > On Mon, 2010-07-26 at 15:53 +0100, Ian Jackson wrote:
> > >   * Code motion between files, and creation of libxl_linux.c;
> > >   * Provide libxl_netbsd.c and associated Makefile changes to
> > >     disable blktap2 on netbsd
> >
> > I wonder if this might be better as libxl_blk_blktap.c and
> > libxl_blk_none.c or something to correspond to the presence of the
> > specific feature rather than an OS which happens to implement the
> > feature?
>
> Good point.
>
> > (I guess in this specific instance the chances of blktap
> > cropping up on another OS is pretty slim).
>
> Well, but there's no harm to naming the feature rather than the
> platform.  It's good practice.

It's bad practise to have OS specific code in common code.
There's a lot of sysfs code in libxl.c - currently only used for
pci passthrough.

In June/July I discussed three other API functions with Stephano
(which are not part of this series):

- libxl_pciback_flr
     performs FLR on the device specified by BFD

- libxl_pciback_bind
     unhooks pci device from dom0 and bind to pciback

- libxl_pciback_unbind
     unbind pci device from pciback and give back to dom0

These should allow to move all sysfs code in libxl.c into a linux specific
file.


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel