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

Re: [Xen-devel] [PATCH RFC 01/18] xen/tools: Fix virtual disks helper scripts.



Wei,

Actually it should be the oldest patch in our current series, it was
initial researches, I tried to fit the dom0 system rootfs into
smallest possible initramfs so lean busybox was there.

>> +#trap sigerr ERR
> > -trap sigerr ERR
>
> I know why you want to comment this out but you basically break the
> error handling protocol. See the fatal function at the beginning of this
> file.
And yes we should check this particular line change carefully 'cause
it was not intelligent adjusting to busybox, just getting rid of nasty
issue.

> And you should probably fix your own environment, too.
I'm not sure I got the point. If we are speaking about our system we
are tied to this
http://processors.wiki.ti.com/index.php/Category:GLSDK in dom0. I
doubt it will be accepted by customer switching to any rich shell.

Andrii Anisov | Associate Manager, Engineering
GlobalLogic
Kyiv, 03038, Protasov Business Park, M.Grinchenka, 2/1
P +38.044.492.9695x3664  M +380505738852  S andriyanisov
www.globallogic.com

http://www.globallogic.com/email_disclaimer.txt

On Thu, May 19, 2016 at 2:34 PM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
>
> On Wed, May 18, 2016 at 07:32:24PM +0300, Andrii Anisov wrote:
> > This patch makes virtual disks helper scripts be functional
> > in busybox environment. Actually we call sh insteand of bash and
> > rewrite loop with counter to be properly parsed by ash.
> >
> > Signed-off-by: Andrii Anisov <andrii.anisov@xxxxxxxxxxxxxxx>
> > Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@xxxxxxxxxxxxxxx>
> > ---
> >  tools/hotplug/Linux/block                    | 2 +-
> >  tools/hotplug/Linux/locking.sh               | 9 +++++++--
> >  tools/hotplug/Linux/xen-hotplug-common.sh.in | 2 +-
> >  3 files changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/hotplug/Linux/block b/tools/hotplug/Linux/block
> > index 8d2ee9d..6a725db 100644
> > --- a/tools/hotplug/Linux/block
> > +++ b/tools/hotplug/Linux/block
> > @@ -1,4 +1,4 @@
> > -#!/bin/bash
> > +#!/bin/sh
> >
> >  dir=$(dirname "$0")
> >  . "$dir/block-common.sh"
> > diff --git a/tools/hotplug/Linux/locking.sh b/tools/hotplug/Linux/locking.sh
> > index c6a7e96..b8e9515 100644
> > --- a/tools/hotplug/Linux/locking.sh
> > +++ b/tools/hotplug/Linux/locking.sh
> > @@ -23,9 +23,14 @@ LOCK_BASEDIR=/var/run/xen-hotplug
> >
> >  _setlockfd()
> >  {
> > +    local lock_
> >      local i
> > -    for ((i = 0; i < ${#_lockdict}; i++))
> > -    do [ -z "${_lockdict[$i]}" -o "${_lockdict[$i]}" = "$1" ] && break
> > +    let i=0
> > +
> > +    for lock_ in _lockdict ;
> > +    do
> > +    [ -z "$lock_" -o "$lock_" = "$1" ] && break
> > +    (( i++ ))
> >      done
> >      _lockdict[$i]="$1"
> >      let _lockfd=200+i
> > diff --git a/tools/hotplug/Linux/xen-hotplug-common.sh.in 
> > b/tools/hotplug/Linux/xen-hotplug-common.sh.in
> > index d5d0b69..42e46e3 100644
> > --- a/tools/hotplug/Linux/xen-hotplug-common.sh.in
> > +++ b/tools/hotplug/Linux/xen-hotplug-common.sh.in
> > @@ -51,7 +51,7 @@ sigerr() {
> >    fatal "$0 failed; error detected."
> >  }
> >
>> +#trap sigerr ERR
> > -trap sigerr ERR
>
> I know why you want to comment this out but you basically break the
> error handling protocol. See the fatal function at the beginning of this
> file.
>
> So we can't take this patch. And you should probably fix your own
> environment, too.
>
> Wei.
>
> >
> >
> >  ##
> > --
> > 2.8.2
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxx
> > http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.