disassembler: Improve header error messages
[b43-tools.git] / disassembler / main.c
index 601c84a9796022459b4af5a93fcb5ebfbcdd3018..09e7643038b64f4d963bc5a9fe255269e80938ae 100644 (file)
@@ -803,7 +803,7 @@ static void emit_asm(struct disassembler_context *ctx)
                switch (stmt->type) {
                case STMT_INSN:
                        if (cmdargs.print_addresses)
-                               fprintf(outfile, "/* %03X */", addr);
+                               fprintf(outfile, "/* %04X */", addr);
                        fprintf(outfile, "\t%s", stmt->u.insn.name);
                        first = 1;
                        for (i = 0; i < ARRAY_SIZE(stmt->u.insn.operands); i++) {
@@ -857,11 +857,11 @@ static int read_input(struct disassembler_context *ctx)
        case FMT_B43:
                ret = fread(&hdr, 1, sizeof(hdr), infile);
                if (ret != sizeof(hdr)) {
-                       fprintf(stderr, "Corrupt input file (not fwcutter output)\n");
+                       fprintf(stderr, "Corrupt input file (no b43 header found)\n");
                        goto err_close;
                }
                if (hdr.type != FW_TYPE_UCODE) {
-                       fprintf(stderr, "Corrupt input file. Not a microcode image.\n");
+                       fprintf(stderr, "Corrupt input file. Not a b43 microcode image.\n");
                        goto err_close;
                }
                if (hdr.ver != FW_HDR_VER) {