Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee52055a authored by Tsu Chiang Chuang's avatar Tsu Chiang Chuang
Browse files

Add explicit 'help' command to fastboot.

Change-Id: I350feab372e105755509c81604d57b2de1a69163
parent dce4d06b
Loading
Loading
Loading
Loading
+29 −23
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ void usage(void)
            "  continue                                 continue with autoboot\n"
            "  reboot                                   reboot device normally\n"
            "  reboot-bootloader                        reboot device into bootloader\n"
            "  help                                     show this help message\n"
            "\n"
            "options:\n"
            "  -w                                       erase userdata and cache\n"
@@ -236,7 +237,6 @@ void usage(void)
            "  -b <base_addr>                           specify a custom kernel base address\n"
            "  -n <page size>                           specify the nand page size. default: 2048\n"
        );
    exit(1);
}

void *load_bootable_image(unsigned page_size, const char *kernel, const char *ramdisk,
@@ -525,7 +525,7 @@ void do_flashall(void)
}

#define skip(n) do { argc -= (n); argv += (n); } while (0)
#define require(n) do { if (argc < (n)) usage(); } while (0)
#define require(n) do { if (argc < (n)) usage(); exit(1);} while (0)

int do_oem_command(int argc, char **argv)
{
@@ -566,6 +566,12 @@ int main(int argc, char **argv)
        return 0;
    }

    if (!strcmp(*argv, "help")) {
        usage();
        return 0;
    }


    serial = getenv("ANDROID_SERIAL");

    while (argc > 0) {