From: J Evans <g4@novadsp.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] mke2img: add parameter sanity checks to prevent odd error messages from genext2.fs
Date: Sat, 29 Apr 2017 17:01:22 +0100 [thread overview]
Message-ID: <1493481682-128366-2-git-send-email-g4@novadsp.com> (raw)
In-Reply-To: <1493481682-128366-1-git-send-email-g4@novadsp.com>
Signed-off-by: J Evans <g4@novadsp.com>
---
package/mke2img/mke2img | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/mke2img/mke2img b/package/mke2img/mke2img
index b773aa9..c50dc66 100755
--- a/package/mke2img/mke2img
+++ b/package/mke2img/mke2img
@@ -44,6 +44,12 @@ main() {
if [ -z "${image}" ]; then
error "you must specify an output image file with '-o'\n"
fi
+ if [ -z "${nb_blocks}" ]; then
+ error "Error: you must specify a file system block count with '-b'. This cannot be zero, e.g. 61440 == 60MB\n"
+ fi
+ if [ "${nb_blocks}" -eq 0 ]; then
+ error "Error: The file system block count size cannot be zero. e.g. 61440 == 60MB \n"
+ fi
case "${gen}:${rev}" in
2:0|2:1|3:1|4:1)
;;
--
2.7.4
next prev parent reply other threads:[~2017-04-29 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-29 16:01 [Buildroot] [PATCH 1/2] ext2.mk: ensure file system block count is not zero (0) J Evans
2017-04-29 16:01 ` J Evans [this message]
2017-04-29 19:06 ` [Buildroot] [PATCH 2/2] mke2img: add parameter sanity checks to prevent odd error messages from genext2.fs Thomas Petazzoni
2017-04-30 9:25 ` Yann E. MORIN
2017-04-30 9:32 ` Thomas Petazzoni
2017-04-29 19:03 ` [Buildroot] [PATCH 1/2] ext2.mk: ensure file system block count is not zero (0) Thomas Petazzoni
2017-04-30 9:18 ` Yann E. MORIN
2017-04-30 12:18 ` jerry at chordia.co.uk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1493481682-128366-2-git-send-email-g4@novadsp.com \
--to=g4@novadsp.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox