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

Commit e05b9c75 authored by Tsu Chiang Chuang's avatar Tsu Chiang Chuang Committed by Android (Google) Code Review
Browse files

Merge "Add explicit 'help' command to fastboot."

parents 87da5483 ee52055a
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) {