FreeCalypso > hg > freecalypso-sw
comparison target-utils/libmpffs/cmd_find.c @ 196:3daa8ebbe74d
pirexplore: a bit of refactoring
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 14 Dec 2013 07:55:22 +0000 |
parents | target-utils/pirexplore/ffs.c@7029fe8ae0bc |
children |
comparison
equal
deleted
inserted
replaced
195:549e6cd1e77d | 196:3daa8ebbe74d |
---|---|
1 #include <sys/types.h> | |
2 #include "types.h" | |
3 | |
4 void | |
5 cmd_find(argbulk) | |
6 char *argbulk; | |
7 { | |
8 char *argv[2]; | |
9 int stat, cont; | |
10 u8 *start; | |
11 size_t size; | |
12 | |
13 if (parse_args(argbulk, 1, 1, argv, 0) < 0) | |
14 return; | |
15 stat = mpffs_find_file(argv[0], &start, &size, &cont); | |
16 if (stat < 0) | |
17 return; | |
18 printf("chunk @%08X size %x\n", (u32)start, (u32)size); | |
19 while (cont) { | |
20 stat = mpffs_get_segment(cont, &start, &size, &cont); | |
21 if (stat < 0) | |
22 return; | |
23 printf("chunk @%08X size %x\n", (u32)start, (u32)size); | |
24 } | |
25 } |