FreeCalypso > hg > freecalypso-reveng
annotate pirollback/analyze.c @ 44:074237879eca
pirollback: name check implemented
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 06 Jul 2013 21:31:55 +0000 |
parents | 9f4469766c74 |
children | 78ac405716db |
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); |
43
9f4469766c74
pirollback: tree walk implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
42
diff
changeset
|
18 walk_tree(); |
9f4469766c74
pirollback: tree walk implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
42
diff
changeset
|
19 printf("Tree walk succeeded\n"); |
44
074237879eca
pirollback: name check implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
43
diff
changeset
|
20 check_object_names(); |
074237879eca
pirollback: name check implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
43
diff
changeset
|
21 printf("Name check succeeded\n"); |
42
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 exit(0); |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 } |