OSDN Git Service

Make SIZE a mandatory parameter.
authorYing Wang <wangying@google.com>
Mon, 19 Nov 2012 18:42:55 +0000 (10:42 -0800)
committerYing Wang <wangying@google.com>
Mon, 19 Nov 2012 20:01:43 +0000 (12:01 -0800)
Commit b4eca4b24af9c80ebb2a7fa2ba539a48096b7576 introduced a new
optional parameter FILE_CONTEXTS.
But the script can accept only 1 optional parameter as the last one.
Otherwise FILE_CONTEXTS may be taken as SIZE.

Change-Id: I1a701e191769f3936cfe6557ea3a20e1691dc859

ext4_utils/mkuserimg.sh

index 1136a9e..c44129e 100755 (executable)
@@ -17,7 +17,7 @@ if [ "$1" = "-s" ]; then
   shift
 fi
 
-if [ $# -ne 4 -a $# -ne 5 -a $# -ne 6 ]; then
+if [ $# -ne 5 -a $# -ne 6 ]; then
   usage
   exit 1
 fi
@@ -45,7 +45,8 @@ if [ -z $MOUNT_POINT ]; then
 fi
 
 if [ -z $SIZE ]; then
-    SIZE=128M
+  echo "Need size of filesystem"
+  exit 2
 fi
 
 if [ -n "$FC" ]; then