fastboot: move help command before usb connect
Move the help command handling before the call to open_device so that is doesn't block when no device is connected. Bug: 7078873 Change-Id: I4e9a4317bd72b4ceb4b9fc838eafd2e57b17a473
This commit is contained in:
parent
1182e61f76
commit
c7b75dcc1a
|
@ -850,6 +850,11 @@ int main(int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (argc > 0 && !strcmp(*argv, "help")) {
|
||||
usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
usb = open_device();
|
||||
|
||||
while (argc > 0) {
|
||||
|
@ -940,9 +945,6 @@ int main(int argc, char **argv)
|
|||
wants_reboot = 1;
|
||||
} else if(!strcmp(*argv, "oem")) {
|
||||
argc = do_oem_command(argc, argv);
|
||||
} else if (!strcmp(*argv, "help")) {
|
||||
usage();
|
||||
return 0;
|
||||
} else {
|
||||
usage();
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue