diff --git a/rbutil/e200rpatcher/e200rpatcher.c b/rbutil/e200rpatcher/e200rpatcher.c index 8d0c674a5e..e71a771e04 100644 --- a/rbutil/e200rpatcher/e200rpatcher.c +++ b/rbutil/e200rpatcher/e200rpatcher.c @@ -28,6 +28,7 @@ #include #include #include +#include "stdbool.h" #include "bootimg.h" @@ -183,37 +184,56 @@ found: usb_close(dh); } - +void print_usage(void) +{ + fprintf(stderr,"Usage: e200rpatcher [options]\n"); + fprintf(stderr,"Options:\n"); + fprintf(stderr," -s, --silent\t\tDont display instructions\n"); +} int main(int argc, char* argv[]) { char input[4]; - - /* We don't use the arguments */ - (void)argc; - (void)argv; + int silent = 0; + int i; + + /* check args */ + if ((argc > 1) && ((strcmp(argv[1],"-h")==0) || (strcmp(argv[1],"--help")==0))) { + print_usage(); + return 1; + } + for (i=1;i