summaryrefslogtreecommitdiff
path: root/tools/imagetool.h
diff options
context:
space:
mode:
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>2015-01-15 02:48:06 -0200
committerTom Rini <trini@ti.com>2015-01-29 13:38:41 -0500
commit067d15607598884e270f3076c721f56d3c4f65e6 (patch)
tree06f5767d8a717e895179d0209cc32ab1af2fb7e1 /tools/imagetool.h
parent0ca6691c2ec20ff264d882854c339795579991f5 (diff)
downloadu-boot-imx-067d15607598884e270f3076c721f56d3c4f65e6.zip
u-boot-imx-067d15607598884e270f3076c721f56d3c4f65e6.tar.gz
u-boot-imx-067d15607598884e270f3076c721f56d3c4f65e6.tar.bz2
imagetool: make the image_save_datafile() available to all image types
Move the image_save_datafile() function from an U-Multi specific file (default_image.c) to a file common to all image types (image.c). And rename it to genimg_save_datafile(), to make clear it is useful for any image type. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Diffstat (limited to 'tools/imagetool.h')
-rw-r--r--tools/imagetool.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/imagetool.h b/tools/imagetool.h
index eb2750c..44d9380 100644
--- a/tools/imagetool.h
+++ b/tools/imagetool.h
@@ -181,6 +181,23 @@ int imagetool_verify_print_header(
struct image_type_params *tparams,
struct image_tool_params *params);
+/**
+ * imagetool_save_datafile - store data into a file
+ * @file_name: name of the destination file
+ * @file_data: data to be written
+ * @file_len: the amount of data to store
+ *
+ * imagetool_save_datafile() store file_len bytes of data pointed by file_data
+ * into the file name by file_name.
+ *
+ * returns:
+ * zero in case of success or a negative value if fail.
+ */
+int imagetool_save_datafile(
+ const char *file_name,
+ ulong file_data,
+ ulong file_len);
+
/*
* There is a c file associated with supported image type low level code
* for ex. default_image.c, fit_image.c