It contains a reserved field that remains uninitialized otherwise and is
written to the output file.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
When source image file ends with empty (sparse) area, this area is
skipped and incomplete sparse file is generated.
Signed-off-by: Wojciech Nizinski <wojciech.nizinski@grinn-global.com>
When none of the images need files from the rootpath, then make it
optional. Some types never need it. For others the image must be explicitly
marked as empty.
Fixes: #181
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
On a 64 bit system off_t can hold signed, 64 bit integers. Putting large
off_t values in a 32 bit int results in overflows. These overflows
trigger the "< 0" check and result in errors. This can be observed on
large input images.
lseek() returns an off_t, so introduce an off_t to store its return
value appropriately.
Signed-off-by: Bastian Krause <bst@pengutronix.de>