diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-29 20:47:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-02-09 10:08:58 +0100 |
commit | 6f3ff5e61c3ff92356345604415dd682b817bf76 (patch) | |
tree | ada1080770116bf729c2e8c12c3e0ee70ebe5429 /include/ubiformat.h | |
parent | 359966df3721803a1e0873c98182e7280029b068 (diff) | |
download | barebox-6f3ff5e61c3ff92356345604415dd682b817bf76.tar.gz barebox-6f3ff5e61c3ff92356345604415dd682b817bf76.tar.xz |
ubiformat: Allow to ubiformat with a buffer given
So far ubiformat can only handle files. Make it possible to pass
a buffer into ubiformat.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/ubiformat.h')
-rw-r--r-- | include/ubiformat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ubiformat.h b/include/ubiformat.h index 8305a853c7..8a7a16ac18 100644 --- a/include/ubiformat.h +++ b/include/ubiformat.h @@ -15,7 +15,14 @@ struct ubiformat_args { int ubi_ver; uint32_t image_seq; long long ec; + + /* + * Either set image if you have a file or set image_buf / image_size + * if you have a buffer. + */ const char *image; + const void *image_buf; + loff_t image_size; }; int ubiformat(struct mtd_info *mtd, struct ubiformat_args *args); |