FreeCalypso > hg > freecalypso-reveng
annotate pirollback/analyze.c @ 383:97a294f69426
pirelli/audio-tones: basic keybeep and DTMF captured
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 10 Nov 2021 01:22:36 +0000 |
parents | 78ac405716db |
children |
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; |
46
78ac405716db
pirollback: journal parsing implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
44
diff
changeset
|
6 extern int journal_start_ino; |
42
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 main(argc, argv) |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 char **argv; |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 { |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 if (argc != 2) { |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 fprintf(stderr, "usage: %s ffs-image\n", argv[0]); |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 exit(1); |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 } |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 imgfile = argv[1]; |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 read_img_file(); |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 read_inodes(); |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 printf("Last inode is #%x\n", last_inode); |
43
9f4469766c74
pirollback: tree walk implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
42
diff
changeset
|
19 walk_tree(); |
9f4469766c74
pirollback: tree walk implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
42
diff
changeset
|
20 printf("Tree walk succeeded\n"); |
44
074237879eca
pirollback: name check implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
43
diff
changeset
|
21 check_object_names(); |
074237879eca
pirollback: name check implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
43
diff
changeset
|
22 printf("Name check succeeded\n"); |
46
78ac405716db
pirollback: journal parsing implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
44
diff
changeset
|
23 parse_journal(); |
78ac405716db
pirollback: journal parsing implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
44
diff
changeset
|
24 printf("Journal parse successful, start inode is #%x\n", |
78ac405716db
pirollback: journal parsing implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
44
diff
changeset
|
25 journal_start_ino); |
42
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 exit(0); |
15c2ac2c5c73
pirollback: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 } |