예제 #1
0
int main(int argc, char *argv[])
{
	const char *file;
	char *buf;
	bool debug = false;
	off_t len;

	file = argv[1];

	/* TODO: I will pass the buf a pointer to the device tree blob
	* instead of reading a binary file. */

	buf = utilfdt_read_len(file, &len);
	if (!buf)
		die("could not read: %s\n", file);

	dump_blob(buf, debug);

	return 0;
}
예제 #2
0
char *utilfdt_read(const char *filename)
{
	off_t len;
	return utilfdt_read_len(filename, &len);
}