* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
IMAGE_BINARY, /* plain binary */
IMAGE_IHEX, /* intel hex-record format */
IMAGE_MEMORY, /* target-memory pseudo-image */
IMAGE_ELF, /* ELF binary */
IMAGE_SRECORD, /* motorola s19 */
IMAGE_BUILDER, /* when building a new image */
IMAGE_BINARY, /* plain binary */
IMAGE_IHEX, /* intel hex-record format */
IMAGE_MEMORY, /* target-memory pseudo-image */
IMAGE_ELF, /* ELF binary */
IMAGE_SRECORD, /* motorola s19 */
IMAGE_BUILDER, /* when building a new image */
void *type_private; /* type private data */
int num_sections; /* number of sections contained in the image */
void *type_private; /* type private data */
int num_sections; /* number of sections contained in the image */
int start_address_set; /* whether the image has a start address (entry point) associated */
uint32_t start_address; /* start address, if one is set */
int start_address_set; /* whether the image has a start address (entry point) associated */
uint32_t start_address; /* start address, if one is set */
-int image_open(image_t *image, const char *url, const char *type_string);
-int image_read_section(image_t *image, int section, uint32_t offset,
- uint32_t size, uint8_t *buffer, uint32_t *size_read);
-void image_close(image_t *image);
+int image_open(struct image *image, const char *url, const char *type_string);
+int image_read_section(struct image *image, int section, uint32_t offset,
+ uint32_t size, uint8_t *buffer, size_t *size_read);
+void image_close(struct image *image);
-int image_add_section(image_t *image, uint32_t base, uint32_t size,
- int flags, uint8_t *data);
+int image_add_section(struct image *image, uint32_t base, uint32_t size,
+ int flags, uint8_t const *data);
#define ERROR_IMAGE_FORMAT_ERROR (-1400)
#define ERROR_IMAGE_TYPE_UNKNOWN (-1401)
#define ERROR_IMAGE_TEMPORARILY_UNAVAILABLE (-1402)
#define ERROR_IMAGE_CHECKSUM (-1403)
#define ERROR_IMAGE_FORMAT_ERROR (-1400)
#define ERROR_IMAGE_TYPE_UNKNOWN (-1401)
#define ERROR_IMAGE_TEMPORARILY_UNAVAILABLE (-1402)
#define ERROR_IMAGE_CHECKSUM (-1403)