Re: [U-Boot] [PATCH] MAKEALL: Do a sanity check on user-supplied arguments

2010-11-14 Thread Wolfgang Denk
Dear Peter Tyser,

In message 1288393146-9753-1-git-send-email-pty...@xes-inc.com you wrote:
 Add a check to make sure that the user's arguments actually find a board
 in boards.cfg.  Previously, if a user misspelled an argument the
 argument would be discarded without warning.  For example, running
 'MAKEALL -c 85xx' with the intention of compiling all Freescale 85xx
 boards would instead silently discard the '-c 85xx' argument since the
 proper cpu name is 'mpc85xx' and then proceed to compile all PowerPC
 boards (MAKEALL's default).
 
 Also fix an unrelated typo.
 
 Signed-off-by: Peter Tyser pty...@xes-inc.com
 ---
  MAKEALL |8 +++-
  1 files changed, 7 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I realize that command does have its fascination, even under  circum-
stances such as these, but I neither enjoy the idea of command nor am
I  frightened  of  it. It simply exists, and I will do whatever logi-
cally needs to be done.
-- Spock, The Galileo Seven, stardate 2812.7
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] MAKEALL: Do a sanity check on user-supplied arguments

2010-10-29 Thread Peter Tyser
Add a check to make sure that the user's arguments actually find a board
in boards.cfg.  Previously, if a user misspelled an argument the
argument would be discarded without warning.  For example, running
'MAKEALL -c 85xx' with the intention of compiling all Freescale 85xx
boards would instead silently discard the '-c 85xx' argument since the
proper cpu name is 'mpc85xx' and then proceed to compile all PowerPC
boards (MAKEALL's default).

Also fix an unrelated typo.

Signed-off-by: Peter Tyser pty...@xes-inc.com
---
 MAKEALL |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index c54c6e8..767d561 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -11,7 +11,7 @@
 # line; without any arguments, MAKEALL defaults to building all Power
 # Architecture systems (i. e. same as for MAKEALL powerpc).
 #
-# With the iontroduction of the board.cfg file, it has become possible
+# With the introduction of the board.cfg file, it has become possible
 # to provide additional selections.  We use standard command line
 # options for this:
 #
@@ -125,6 +125,12 @@ FILTER=\$1 !~ /^#/
 
 if [ $SELECTED ] ; then
SELECTED=$(awk '('$FILTER') { print $1 }' boards.cfg)
+
+   # Make sure some boards from boards.cfg are actually found
+   if [ -z $SELECTED ] ; then
+   echo Error: No boards selected, invalid arguments
+   exit 1
+   fi
 fi
 
 #
-- 
1.7.0.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot