Hello. On Sat, 2012-01-07 at 19:25, Angelo S. Mavridis Bartolome wrote: > From: "Angelo S. Mavridis Bartolome" <barkl...@gmail.com> > > --- > src/moto-boot-usb.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/src/moto-boot-usb.c b/src/moto-boot-usb.c > index 962a236..5af26a9 100644 > --- a/src/moto-boot-usb.c > +++ b/src/moto-boot-usb.c > @@ -626,6 +626,8 @@ static void usage() > "execute code at ram address\n" > " moto-boot-usb setflag usb|dumpkeys|passthrough\t" > "set memory flag for gen-blob\n" > + " moto-boot-usb help|--help\t\t\t" > + "show this help screen\n" > " moto-boot-usb off\t\t\t\t" > "power off the phone\n\n"); > > @@ -875,6 +877,12 @@ int main(int argc, char *argv[]) > error("Too few arguments."); > exit(1); > } > + > + if (!strcmp(argv[1], "help") || !strcmp(argv[1], "--help")) { > + usage(); > + exit(0); > + }
Thinks looks a lot better. Nice suggestion from Antonio to avoid the helpParam variable at all. Antonio, could you apply this? I don't have a moto-boot-usb tree on my disk anymore. regards Stefan Schmidt