]> www.infradead.org Git - mtd-utils.git/commitdiff
mtd-utils: flash_otp_dump make offset optional
authorMichael Walle <michael@walle.cc>
Thu, 18 Aug 2022 09:35:48 +0000 (11:35 +0200)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Tue, 27 Sep 2022 06:32:46 +0000 (08:32 +0200)
Commit 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to
flash_otp_dump") introduced an offset parameter. This should have
been optional, but there was a typo. Fix it.

Reported-by: Sergei Antonov <saproj@gmail.com>
Fixes: 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump")
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Sergei Antonov <saproj@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
misc-utils/flash_otp_dump.c

index f1e1782fb71778a75b8ee1e837806feb021517a4..324d8568ed42eb65b3c77fcd29495e6a30dbf73a 100644 (file)
@@ -20,7 +20,7 @@ int main(int argc,char *argv[])
        int offset = 0;
        unsigned char buf[16];
 
-       if (argc <= 3 || (strcmp(argv[1], "-f") && strcmp(argv[1], "-u"))) {
+       if (argc < 3 || (strcmp(argv[1], "-f") && strcmp(argv[1], "-u"))) {
                fprintf(stderr,"Usage: %s [ -f | -u ] <device> [<offset>]\n", PROGRAM_NAME);
                return EINVAL;
        }