mtd: add dump command help
authorPaweł Owoc <[email protected]>
Sat, 8 Nov 2025 21:08:18 +0000 (22:08 +0100)
committerHauke Mehrtens <[email protected]>
Mon, 24 Nov 2025 23:43:23 +0000 (00:43 +0100)
Add missing dump command help.

Signed-off-by: Paweł Owoc <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20725
Signed-off-by: Hauke Mehrtens <[email protected]>
package/system/mtd/src/mtd.c

index be6de2f63e72fafbfdb4999c0f6f4b55980fc663..847170cb402f93abadd8f671b81205d4ee711fb4 100644 (file)
@@ -774,6 +774,7 @@ static void usage(void)
        fprintf(stderr, "Usage: mtd [<options> ...] <command> [<arguments> ...] <device>[:<device>...]\n\n"
        "The device is in the format of mtdX (eg: mtd4) or its label.\n"
        "mtd recognizes these commands:\n"
+       "        dump                    dump mtd device\n"     
        "        unlock                  unlock the device\n"
        "        refresh                 refresh mtd partition\n"
        "        erase                   erase all data on device\n"
@@ -816,7 +817,10 @@ static void usage(void)
        if (mtd_fixtrx) {
            fprintf(stderr,
        "        -M <magic>              magic number of the image header in the partition (for fixtrx)\n"
-       "        -o offset               offset of the image header in the partition(for fixtrx)\n");
+       "        -o offset               offset of the image header in the partition (for dump / fixtrx)\n");
+       } else {
+           fprintf(stderr,
+       "        -o offset               offset of the image header in the partition (for dump)\n");
        }
        if (mtd_fixtrx || mtd_fixseama || mtd_fixwrg || mtd_fixwrgg) {
                fprintf(stderr,