Lines Matching defs:out_file
79 FILE *out_file;
170 out_file = stdout;
173 out_file = fopen(out_fn, "w");
174 if (!out_file) {
247 fprintf(out_file, "Using external journal found at %s\n",
254 dump_journal(argv[0], out_file, &journal_source);
262 if (out_file && (out_file != stdout))
263 fclose(out_file);
331 static void dump_journal(char *cmdname, FILE *out_file,
366 fprintf(out_file, "Ext2 superblock header found.\n");
368 fprintf(out_file, "\tuuid=%s\n", jsb_buffer);
369 fprintf(out_file, "\tblocksize=%d\n", blocksize);
370 fprintf(out_file, "\tjournal data size %lu\n",
384 fprintf(out_file,
392 fprintf(out_file, "Journal starts at block %u, transaction %u\n",
413 fprintf (out_file, "No magic number at block %u: "
419 fprintf (out_file, "Found sequence %u (not %u) at "
426 fprintf (out_file, "Found expected sequence %u, "
434 dump_descriptor_block(out_file, source, buf, jsb,
446 dump_revoke_block(out_file, buf, jsb,
454 fprintf (out_file, "Unexpected block type %u at "
462 static void dump_descriptor_block(FILE *out_file,
483 fprintf(out_file, "Dumping descriptor block, sequence %u, at "
507 dump_metadata_block(out_file, source, jsb,
520 static void dump_revoke_block(FILE *out_file, char *buf,
531 fprintf(out_file, "Dumping revoke block, sequence %u, at "
542 fprintf(out_file, " Revoke FS block %u", rblock);
544 fprintf(out_file, "\n");
546 fprintf(out_file," at block %u, sequence %u\n",
554 static void show_extent(FILE *out_file, int start_extent, int end_extent,
558 fprintf(out_file, "(%d+%u): %u ",
562 static void show_indirect(FILE *out_file, const char *name, __u32 where)
565 fprintf(out_file, "(%s): %u ", name, where);
569 static void dump_metadata_block(FILE *out_file, struct journal_source *source,
587 fprintf(out_file, " FS block %u logged at ", fs_blocknr);
589 fprintf(out_file, "sequence %u, ", transaction);
590 fprintf(out_file, "journal block %u (flags 0x%x)\n", log_blocknr,
625 fprintf(out_file, " (block bitmap for block %u: "
635 fprintf(out_file, " (inode block for inode %u):\n",
639 internal_dump_inode(out_file, " ", inode_to_dump, inode, 0);
646 fprintf (out_file, " Blocks: ");
655 show_extent(out_file, start_extent, i, first);
660 show_extent(out_file, start_extent, i, first);
661 show_indirect(out_file, "IND", inode->i_block[i++]);
662 show_indirect(out_file, "DIND", inode->i_block[i++]);
663 show_indirect(out_file, "TIND", inode->i_block[i++]);
665 fprintf(out_file, "\n");
669 do_hexdump(out_file, buf, blocksize);
673 static void do_hexdump (FILE *out_file, char *buf, int blocksize)
684 fprintf(out_file, " %04x: ", i);
686 fprintf(out_file, "%08x ", *intp++);
691 fprintf(out_file, "%c", c);
693 fprintf(out_file, "\n");