Lines Matching defs:out_file
79 FILE *out_file;
170 out_file = stdout;
173 out_file = fopen(out_fn, "w");
174 if (!out_file) {
248 fprintf(out_file, "Using external journal found at %s\n",
255 dump_journal(argv[0], out_file, &journal_source);
263 if (out_file && (out_file != stdout))
264 fclose(out_file);
332 static void dump_journal(char *cmdname, FILE *out_file,
367 fprintf(out_file, "Ext2 superblock header found.\n");
369 fprintf(out_file, "\tuuid=%s\n", jsb_buffer);
370 fprintf(out_file, "\tblocksize=%d\n", blocksize);
371 fprintf(out_file, "\tjournal data size %lu\n",
385 fprintf(out_file,
393 fprintf(out_file, "Journal starts at block %u, transaction %u\n",
414 fprintf (out_file, "No magic number at block %u: "
420 fprintf (out_file, "Found sequence %u (not %u) at "
427 fprintf (out_file, "Found expected sequence %u, "
435 dump_descriptor_block(out_file, source, buf, jsb,
447 dump_revoke_block(out_file, buf, jsb,
455 fprintf (out_file, "Unexpected block type %u at "
463 static void dump_descriptor_block(FILE *out_file,
484 fprintf(out_file, "Dumping descriptor block, sequence %u, at "
508 dump_metadata_block(out_file, source, jsb,
521 static void dump_revoke_block(FILE *out_file, char *buf,
532 fprintf(out_file, "Dumping revoke block, sequence %u, at "
543 fprintf(out_file, " Revoke FS block %u", rblock);
545 fprintf(out_file, "\n");
547 fprintf(out_file," at block %u, sequence %u\n",
555 static void show_extent(FILE *out_file, int start_extent, int end_extent,
559 fprintf(out_file, "(%d+%u): %u ",
563 static void show_indirect(FILE *out_file, const char *name, __u32 where)
566 fprintf(out_file, "(%s): %u ", name, where);
570 static void dump_metadata_block(FILE *out_file, struct journal_source *source,
588 fprintf(out_file, " FS block %u logged at ", fs_blocknr);
590 fprintf(out_file, "sequence %u, ", transaction);
591 fprintf(out_file, "journal block %u (flags 0x%x)\n", log_blocknr,
626 fprintf(out_file, " (block bitmap for block %llu: "
636 fprintf(out_file, " (inode block for inode %u):\n",
640 internal_dump_inode(out_file, " ", inode_to_dump, inode, 0);
647 fprintf (out_file, " Blocks: ");
656 show_extent(out_file, start_extent, i, first);
661 show_extent(out_file, start_extent, i, first);
662 show_indirect(out_file, "IND", inode->i_block[i++]);
663 show_indirect(out_file, "DIND", inode->i_block[i++]);
664 show_indirect(out_file, "TIND", inode->i_block[i++]);
666 fprintf(out_file, "\n");
670 do_hexdump(out_file, buf, blocksize);
674 static void do_hexdump (FILE *out_file, char *buf, int blocksize)
685 fprintf(out_file, " %04x: ", i);
687 fprintf(out_file, "%08x ", *intp++);
692 fprintf(out_file, "%c", c);
694 fprintf(out_file, "\n");