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] tools: don't require hardcoded path in guest con

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] tools: don't require hardcoded path in guest config file
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Mon, 22 Jun 2009 15:01:34 +0200
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Mon, 22 Jun 2009 06:02:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19003.43994.710809.744259@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200906191633.19343.Christoph.Egger@xxxxxxx> <19003.43994.710809.744259@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
On Friday 19 June 2009 17:16:42 Ian Jackson wrote:
> Christoph Egger writes ("[Xen-devel] [PATCH] tools: don't require hardcoded 
path in guest config file"):
> > Attached patch allows xen tools to no longer require the hardcoded path's
> > to hvmloader, qemu-dm and stubdom-dm in the guest config files.
>
> In general I think this is a great idea.
> I just have some detailed quibbles.

Attached is a new version. Fixes your quibbles below.
I hope you like it.

> > +            if not os.path.exists(self['platform']['device_model']):
> > +                self['platform']['device_model'] = \
> > +                    auxbin.pathTo(self['platform']['device_model'])
>
> I think it would be better just to look for a slash in the specified
> value, and always prepend the path.  Otherwise you end up checking for
> the file in xend's cwd which is pretty strange behaviour.
>
> Treating all /-less values as paths in the expected installation
> directory is more sensible.
>
> > +                    # XXX basename works around a bug somewhere in the 
guest
> > +                    # config file parser which prepends cwd to the kernel
> > +                    # w/o checking if the result is valid if no absolute
> > +                    # path is specified 
>
> Surely it would be better to fix the guest config file parser!

Done.

> > +                    if os.path.basename(self['PV_kernel']) 
==  'hvmloader':
>
> That workaround is a pretty hideous hack.


Christoph

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

Attachment: xen_firmwaredir.diff
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>