view target-utils/pirexplore/ffs.c @ 141:f8bb6cd4edd3

k5a3281.init (for GTA0x): set WS=3 for nCS0 like the official firmware does
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 12 Nov 2013 04:53:30 +0000
parents 7029fe8ae0bc
children
line wrap: on
line source

#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);
	}
}