view pirollback/analyze.c @ 315:bc3391aa3d35

frbl/reconst/boot.c: import from TI's FLUID package with defenestrated line endings
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Mar 2020 23:17:27 +0000
parents 78ac405716db
children
line wrap: on
line source

#include <stdio.h>
#include <stdlib.h>

extern char *imgfile;
extern int last_inode;
extern int journal_start_ino;

main(argc, argv)
	char **argv;
{
	if (argc != 2) {
		fprintf(stderr, "usage: %s ffs-image\n", argv[0]);
		exit(1);
	}
	imgfile = argv[1];
	read_img_file();
	read_inodes();
	printf("Last inode is #%x\n", last_inode);
	walk_tree();
	printf("Tree walk succeeded\n");
	check_object_names();
	printf("Name check succeeded\n");
	parse_journal();
	printf("Journal parse successful, start inode is #%x\n",
		journal_start_ino);
	exit(0);
}