package/mke2img: check nb_blocks is specified
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 1 May 2017 15:58:37 +0000 (17:58 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 13 May 2017 13:16:59 +0000 (15:16 +0200)
Since we do not have autocalculation anymore, the user must specify the
exact number of blocks.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/mke2img/mke2img

index b773aa99dbe88da6ee495de6c9f96337a33c5002..758b6dee68d01708e209b3d0ec846befa1498d8d 100755 (executable)
@@ -44,6 +44,9 @@ main() {
     if [ -z "${image}" ]; then
         error "you must specify an output image file with '-o'\n"
     fi
+    if [ -z "${nb_blocks}" ]; then
+        error "you must specify the size of the output image with '-b'\n"
+    fi
     case "${gen}:${rev}" in
     2:0|2:1|3:1|4:1)
         ;;