[PATCH 3/5] defaultenv: add xmodem support for update

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Oct 11 01:11:04 EDT 2010


> >  	exit 1
> >  fi
> >  
> > +if [ x$3 != x ]; then
> > +	mode=$3
> > +fi
> > +
> >  . /env/bin/_update $2
> > diff --git a/defaultenv/bin/update_rootfs b/defaultenv/bin/update_rootfs
> > index 6366315..bac74ca 100644
> > --- a/defaultenv/bin/update_rootfs
> > +++ b/defaultenv/bin/update_rootfs
> > @@ -3,14 +3,19 @@
> >  . /env/config
> >  
> >  image=$rootfsimage
> > +mode=net
> >  
> >  if [ x$1 = xnand ]; then
> >  	part=/dev/nand0.root.bb
> >  elif [ x$1 = xnor ]; then
> >  	part=/dev/nor0.root
> >  else
> > -	echo "usage: $0 nor|nand [imagename]"
> > +	echo "usage: $0 nor|nand [imagename] [net|xmodem]"
> 
> I'm not really happy with this patch. We have 3 positional parameters
> now and with xmodem it makes no sense to supply an image name,
> nontheless we have to supply it because otherwise we do not have three
> arguments.
> I just posted a patch adding a getopt command to hush. Maybe this could
> improve the situation here?
I get exactly the same idea

Best Regards,
J.



More information about the barebox mailing list