comparison target-utils/libtiffs/cmd_find.c @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children 87cb03b35f77
comparison
equal deleted inserted replaced
-1:000000000000 0:e7502631a0f9
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 }