Christoph Egger
2006-Oct-12 08:33 UTC
[Xen-devel] [PATCH] Minor fixes for non-Linux platforms
Hello! The attached patch makes the stuff in tools/check/ work for *BSD systems. Consider this as a start to make xen buildable on non-Linux platforms. I don''t expect to get this into xen 3.0.3, but I hope this can go into -unstable. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger
2006-Oct-12 12:33 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
On Friday 13 October 2006 13:54, Keir Fraser wrote:> On 13/10/06 10:56, "Bastian Blank" <bastian@waldi.eu.org> wrote: > >> diff -r f14a67a35bec tools/check/check_brctl > >> --- a/tools/check/check_brctl Thu Oct 12 17:53:51 2006 +0100 > >> +++ b/tools/check/check_brctl Thu Oct 12 10:17:33 2006 +0200 > >> @@ -1,4 +1,4 @@ > >> -#!/bin/bash > >> +#!/bin/sh > > > > Thats a bad idea. Some of the scripts uses non-POSIX extensions and > > /bin/sh is normaly only defined as POSIX compilant. > > The scripts are tiny. We should stop them using those non-compliant > extensions. We use /bin/sh in just about all our other scripts (and some of > those are *way* more complex).One more try. Patch attached. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Bastian Blank
2006-Oct-13 09:56 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
On Thu, Oct 12, 2006 at 10:33:41AM +0200, Christoph Egger wrote:> diff -r f14a67a35bec tools/check/check_brctl > --- a/tools/check/check_brctl Thu Oct 12 17:53:51 2006 +0100 > +++ b/tools/check/check_brctl Thu Oct 12 10:17:33 2006 +0200 > @@ -1,4 +1,4 @@ > -#!/bin/bash > +#!/bin/shThats a bad idea. Some of the scripts uses non-POSIX extensions and /bin/sh is normaly only defined as POSIX compilant. Bastian -- Men will always be men -- no matter where they are. -- Harry Mudd, "Mudd''s Women", stardate 1329.8 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Oct-13 11:54 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
On 13/10/06 10:56, "Bastian Blank" <bastian@waldi.eu.org> wrote:>> diff -r f14a67a35bec tools/check/check_brctl >> --- a/tools/check/check_brctl Thu Oct 12 17:53:51 2006 +0100 >> +++ b/tools/check/check_brctl Thu Oct 12 10:17:33 2006 +0200 >> @@ -1,4 +1,4 @@ >> -#!/bin/bash >> +#!/bin/sh > > Thats a bad idea. Some of the scripts uses non-POSIX extensions and > /bin/sh is normaly only defined as POSIX compilant.The scripts are tiny. We should stop them using those non-compliant extensions. We use /bin/sh in just about all our other scripts (and some of those are *way* more complex). -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christian Limpach
2006-Oct-13 16:45 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
On 10/12/06, Christoph Egger <Christoph.Egger@amd.com> wrote:> One more try. Patch attached.In check_brctl, you remove the error function but you don''t remove all users of it. christian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Aron Griffis
2006-Oct-13 21:27 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
Christoph Egger wrote: [Thu Oct 12 2006, 08:33:22AM EDT]> diff -r 49d096ef3d76 tools/check/chk > --- a/tools/check/chk Fri Oct 13 10:58:29 2006 +0100 > +++ b/tools/check/chk Thu Oct 12 14:31:08 2006 +0200 > @@ -1,18 +1,7 @@ > -#!/bin/bash > - > -function usage { > - echo "Usage:" > - echo "\t$0 [build|install|clean]" > - echo > - echo "Check suitability for Xen build or install." > - echo "Exit with 0 if OK, 1 if not." > - echo "Prints only failed tests." > - echo > - echo "Calling with ''clean'' removes generated files." > - exit 1 > -} > +#!/bin/sh > > export PATH=${PATH}:/sbin:/usr/sbin > +export OS=`uname -s`export with variable assignment doesn''t work on most Bourne shells. These need to be split up: PATH=${PATH}:/sbin:/usr/sbin OS=`uname -s` export PATH OS> case $1 in > build) > @@ -25,7 +14,15 @@ case $1 in > exit 0 > ;; > *) > - usage > + echo "Usage:" > + echo "\t$0 [build|install|clean]"\t isn''t standard (it doesn''t even work on Linux without -e). You should insert a real tab there instead. Aron _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Aron Griffis
2006-Oct-13 21:56 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
Christoph, Just wondering, why did you get rid of all the functions from these scripts? AFAIK, every Bourne shell ever made supports functions, though they might need to be declared with the older syntax: func() { asdfasdf } Aron _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Oct-14 15:29 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
On Fri, Oct 13, 2006 at 05:56:21PM -0400, Aron Griffis wrote:> Christoph, > > Just wondering, why did you get rid of all the functions from these > scripts? AFAIK, every Bourne shell ever made supports functions, > though they might need to be declared with the older syntax: > > func() { > asdfasdf > }IEEE 1003.1 section 2.9.5 seems to be appropriate: http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_05 And that indeed shows functions being supported as above. Surely we can work to this spec on this matter? Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger
2006-Oct-15 08:39 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
On Friday 13 October 2006, Aron Griffis wrote:> Christoph Egger wrote: [Thu Oct 12 2006, 08:33:22AM EDT] >[...]> > +#!/bin/sh > > > > export PATH=${PATH}:/sbin:/usr/sbin > > +export OS=`uname -s` > > export with variable assignment doesn''t work on most Bourne shells. > These need to be split up: > > PATH=${PATH}:/sbin:/usr/sbin > OS=`uname -s` > export PATH OS >Fixed. [...]> > - usage > > + echo "Usage:" > > + echo "\t$0 [build|install|clean]" > > \t isn''t standard (it doesn''t even work on Linux without -e). > You should insert a real tab there instead.Fixed.> Just wondering, why did you get rid of all the functions from these > scripts? AFAIK, every Bourne shell ever made supports functions, > though they might need to be declared with the older syntax: > > func() { > asdfasdf > }The scripts are so small, you gain nothing with functions - not even just for readability. One exception: The usage function in the chk script actually improves readability. So I converted it to the old and portable Bourne Shell syntax. On Friday 13 October 2006, Christian Limpach wrote:> In check_brctl, you remove the error function but you don''t remove all > users of it.Fixed. New Patch attached. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christoph Egger
2006-Oct-17 14:08 UTC
Re: [Xen-devel] [PATCH] Minor fixes for non-Linux platforms
This is a resend of the patch with a minor adaption for the Solaris patches. The patch is against C/S 11791. Please apply to xen-unstable. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel