annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 #include <stdio.h>
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 #include <stdlib.h>
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 extern char *imgfile;
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 extern int last_inode;
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 main(argc, argv)
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 char **argv;
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 {
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 if (argc != 2) {
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 fprintf(stderr, "usage: %s ffs-image\n", argv[0]);
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 exit(1);
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 }
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 imgfile = argv[1];
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 read_img_file();
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 read_inodes();
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 printf("Last inode is #%x\n", last_inode);
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 exit(0);
15c2ac2c5c73 pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 }