diff pirollback/analyze.c @ 42:15c2ac2c5c73

pirollback: started
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 06 Jul 2013 20:16:34 +0000
parents
children 9f4469766c74
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pirollback/analyze.c	Sat Jul 06 20:16:34 2013 +0000
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+extern char *imgfile;
+extern int last_inode;
+
+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);
+	exit(0);
+}