summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2009-07-13 16:19:25 +0200
committerLuc Verhaegen <libv@skynet.be>2009-07-13 16:19:25 +0200
commit17ca1c5e6a8df6b5663e899504d197862c286d1e (patch)
tree89e65d98ffa191377fe10ff9abf04d53a37fb792
parent5c343ad78251ac0323e119645d58559dfd494b6d (diff)
Improve help, and parse -h/--help.
As suggested by Uwe Hermann.
-rw-r--r--bios_extract.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bios_extract.c b/bios_extract.c
index 21c8473..7b81c72 100644
--- a/bios_extract.c
+++ b/bios_extract.c
@@ -31,8 +31,11 @@
static void
HelpPrint(char *name)
{
- printf("Program to extract AMI Bios images (AMIBIOS '94 and '95).\n\n");
- printf("Usage: %s <action> <filename>\n", name);
+ printf("\n");
+ printf("Program to extract compressed modules from BIOS images.\n");
+ printf("Supports AMI, Award, Asus and Phoenix BIOSes.\n");
+ printf("\n");
+ printf("Usage:\n\t%s <filename>\n", name);
}
unsigned char *
@@ -103,7 +106,7 @@ main(int argc, char *argv[])
int i, len;
unsigned char *tmp;
- if (argc != 2) {
+ if ((argc != 2) || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
HelpPrint(argv[0]);
return 1;
}