summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Guifu <blucerlee@gmail.com>2019-10-12 01:09:53 +0800
committerGao Xiang <hsiangkao@aol.com>2019-10-12 12:45:09 +0800
commitf8bfa605c31d88a56d6505425cb9f202b088010d (patch)
tree74b0a6be0ef0eebf8bb6281a8279777dbf165809
parente50dfb0cb4335867e0f43c74ed4be8dcb830608a (diff)
erofs-utils: fix error handler notes when parameter miss
If a parameter isnot input, mkfs's error handler cannot give a correct notes, fix it. Link: https://lore.kernel.org/r/20191011170953.6267-2-blucerlee@gmail.com Signed-off-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
-rw-r--r--mkfs/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkfs/main.c b/mkfs/main.c
index 6ecc905..1df69d7 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -147,7 +147,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;
}