All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Guifu <blucerlee@gmail.com>
To: linux-erofs@lists.ozlabs.org
Subject: [PATCH v4][ 2/2] erofs-utils: fix error handler notes when parameter miss
Date: Sat, 12 Oct 2019 01:09:53 +0800	[thread overview]
Message-ID: <20191011170953.6267-2-blucerlee@gmail.com> (raw)
In-Reply-To: <20191011170953.6267-1-blucerlee@gmail.com>

If a parameter isnot input, mkfs's error handler cannot give
a correct notes, fix it.

Signed-off-by: Li Guifu <blucerlee@gmail.com>
---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs/main.c b/mkfs/main.c
index 77a4b78..adfc79c 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -143,7 +143,7 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])
 	if (!cfg.c_img_path)
 		return -ENOMEM;
 
-	if (optind > argc) {
+	if (optind >= argc) {
 		erofs_err("Source directory is missing");
 		return -EINVAL;
 	}
-- 
2.17.1


  reply	other threads:[~2019-10-11 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 17:09 [PATCH v4][ 1/2] erofs-utils: introduce fixed UNIX timestamp Li Guifu
2019-10-11 17:09 ` Li Guifu [this message]
2019-10-12  0:19   ` [PATCH v4][ 2/2] erofs-utils: fix error handler notes when parameter miss Gao Xiang via Linux-erofs
2019-10-12  0:18 ` [PATCH v4][ 1/2] erofs-utils: introduce fixed UNIX timestamp Gao Xiang via Linux-erofs

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=20191011170953.6267-2-blucerlee@gmail.com \
    --to=blucerlee@gmail.com \
    --cc=linux-erofs@lists.ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.