view target-utils/libtiffs/cmd_find.c @ 416:30f6d1c32c6f

doc/Flash-boot-defect article removed (no longer relevant) This article is no longer relevant because the issue in question only affected one (1) defective FCDEV3B board which was not and never will be sold.
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 26 Oct 2018 07:11:08 +0000
parents 87cb03b35f77
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 = tiffs_find_file(argv[0], &start, &size, &cont);
	if (stat < 0)
		return;
	printf("chunk @%08X size %x\n", (u32)start, (u32)size);
	while (cont) {
		stat = tiffs_get_segment(cont, &start, &size, &cont);
		if (stat < 0)
			return;
		printf("chunk @%08X size %x\n", (u32)start, (u32)size);
	}
}