X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=fwcutter%2Ffwcutter.c;h=0d828067e26cecb0e63a90d6b3bbb2bdda2fee77;hb=762043b61e46c1b4d61d18931c702b77bcc86067;hp=cfcfbbfb5cbe08782643dc53d49efa0b1cd080df;hpb=ff258f5e0575a8d1ef50f4a6eecf80a199a7dda7;p=b43-tools.git diff --git a/fwcutter/fwcutter.c b/fwcutter/fwcutter.c index cfcfbbf..0d82806 100644 --- a/fwcutter/fwcutter.c +++ b/fwcutter/fwcutter.c @@ -462,10 +462,10 @@ static void print_supported_files(void) "\t" "\n\n"); /* print for legacy driver first */ - for (i = 0; i < FILES; i++) + for (i = 0; i < ARRAY_SIZE(files); i++) if (file_ok(&files[i]) && !(files[i].flags & FW_FLAG_V4)) print_file(&files[i]); - for (i = 0; i < FILES; i++) + for (i = 0; i < ARRAY_SIZE(files); i++) if (file_ok(&files[i]) && files[i].flags & FW_FLAG_V4) print_file(&files[i]); printf("\n"); @@ -491,7 +491,7 @@ static const struct file *find_file(FILE *fd) signature[8], signature[9], signature[10], signature[11], signature[12], signature[13], signature[14], signature[15]); - for (i = 0; i < FILES; ++i) { + for (i = 0; i < ARRAY_SIZE(files); i++) { if (file_ok(&files[i]) && strcasecmp(md5sig, files[i].md5) == 0) { printf("This file is recognised as:\n"); @@ -512,7 +512,9 @@ static const struct file *find_file(FILE *fd) static void print_usage(int argc, char *argv[]) { print_banner(); - printf("\nUsage: %s [OPTION] [driver.sys]\n", argv[0]); + printf("\nA tool to extract firmware for a Broadcom 43xx device\n"); + printf("from a proprietary Broadcom 43xx device driver file.\n"); + printf("\nUsage: %s [OPTION] [proprietary-driver-file]\n", argv[0]); printf(" --unsupported " "Allow working on extractable but unsupported drivers\n"); printf(" -l|--list " @@ -525,8 +527,9 @@ static void print_usage(int argc, char *argv[]) "Print b43-fwcutter version\n"); printf(" -h|--help " "Print this help\n"); - printf("\nExample: %s bcmwl5.sys\n" - " to extract the firmware blobs from bcmwl5.sys\n", + printf("\nExample: %s -w /lib/firmware wl_apsta.o\n" + " to extract the firmware blobs from wl_apsta.o and store\n" + " the resulting firmware in /lib/firmware\n", argv[0]); }