FreeCalypso > hg > freecalypso-tools
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/target-utils/libtiffs/cmd_find.c Sat Jun 11 00:13:35 2016 +0000 @@ -0,0 +1,25 @@ +#include <sys/types.h> +#include "types.h" + +void +cmd_find(argbulk) + char *argbulk; +{ + char *argv[2]; + int stat, cont; + u8 *start; + size_t size; + + if (parse_args(argbulk, 1, 1, argv, 0) < 0) + return; + stat = mpffs_find_file(argv[0], &start, &size, &cont); + if (stat < 0) + return; + printf("chunk @%08X size %x\n", (u32)start, (u32)size); + while (cont) { + stat = mpffs_get_segment(cont, &start, &size, &cont); + if (stat < 0) + return; + printf("chunk @%08X size %x\n", (u32)start, (u32)size); + } +}