X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=fwcutter%2Ffwcutter.c;h=c4b4af7674d5b0ee39469295b1b5add6fa4fd130;hb=46b449be64cfad5d11ee6b40830e2fc9773ef4c9;hp=ae1c63a48c18c40416a0b3104f3a8fd54e0729ee;hpb=712f2d241d3447ebc7b97abd591afe9737ac7fa8;p=b43-tools.git diff --git a/fwcutter/fwcutter.c b/fwcutter/fwcutter.c index ae1c63a..c4b4af7 100644 --- a/fwcutter/fwcutter.c +++ b/fwcutter/fwcutter.c @@ -439,6 +439,8 @@ static void print_file(const struct file *file) printf("%s\t", file->ucode_version); if (strlen(file->ucode_version) < 8) printf("\t"); + printf("%s\t", file->id); + printf("%s\n", file->md5); } @@ -448,10 +450,16 @@ static void print_supported_files(void) print_banner(); printf("\nExtracting firmware is possible " - "from these binary driver files:\n\n"); + "from these binary driver files.\n" + "The column shows the unique identifier string " + "for your firmware.\nYou must select the firmware with the " + "same ID as printed by the kernel driver on modprobe.\n" + "Note that only recent drivers print such a message on modprobe.\n" + "Please read http://linuxwireless.org/en/users/Drivers/b43#devicefirmware\n\n"); printf("\t" "\t\t" "\t" + "\t" "\n\n"); /* print for legacy driver first */ for (i = 0; i < FILES; i++) @@ -553,7 +561,7 @@ static int do_cmp_arg(char **argv, int *pos, if (param) { /* Skip the parameter on the next iteration. */ (*pos)++; - if (*param == 0) { + if (!*param) { printf("%s needs a parameter\n", arg); return ARG_ERROR; } @@ -591,34 +599,34 @@ static int parse_args(int argc, char *argv[]) if (argc < 2) goto out_usage; for (i = 1; i < argc; i++) { - res = cmp_arg(argv, &i, "--list", "-l", 0); + res = cmp_arg(argv, &i, "--list", "-l", NULL); if (res == ARG_MATCH) { cmdargs.mode = FWCM_LIST; continue; } else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--version", "-v", 0); + res = cmp_arg(argv, &i, "--version", "-v", NULL); if (res == ARG_MATCH) { print_banner(); return 1; } else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--help", "-h", 0); + res = cmp_arg(argv, &i, "--help", "-h", NULL); if (res == ARG_MATCH) goto out_usage; else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--identify", "-i", 0); + res = cmp_arg(argv, &i, "--identify", "-i", NULL); if (res == ARG_MATCH) { cmdargs.mode = FWCM_IDENTIFY; continue; } else if (res == ARG_ERROR) goto out; - res = cmp_arg(argv, &i, "--unsupported", NULL, 0); + res = cmp_arg(argv, &i, "--unsupported", NULL, NULL); if (res == ARG_MATCH) { cmdargs.unsupported = 1; continue;