9
0
Fork 0

get_fake_image_handle: set nb_data_entries to 1 and update the header size

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2011-10-08 16:29:50 +02:00 committed by Sascha Hauer
parent 176c244d45
commit 774f88c79b
1 changed files with 2 additions and 0 deletions

View File

@ -181,6 +181,8 @@ static struct image_handle *get_fake_image_handle(struct image_data *data, int n
handle = xzalloc(sizeof(struct image_handle));
header = &handle->header;
handle->data_entries = gen_image_handle_data(iha->data, iha->len);
handle->nb_data_entries = 1;
header->ih_size = cpu_to_uimage(iha->len);
handle->data = handle->data_entries[0].data;
return handle;