X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Fimage.c;h=9a9c9553b87f1b66bdb71da7ebf684fb1bdb8a4f;hb=94f5ed90f1832e81803713f4364de586a69247d4;hp=b9e641b331217bbc41a4d35f5af1f0c9d319bd58;hpb=053a763aa61a801ac2259ee87aaed4cd140557d9;p=openocd.git diff --git a/src/target/image.c b/src/target/image.c index b9e641b331..9a9c9553b8 100644 --- a/src/target/image.c +++ b/src/target/image.c @@ -44,10 +44,10 @@ ((elf->endianness == ELFDATA2LSB)? \ le_to_h_u32((uint8_t*)&field):be_to_h_u32((uint8_t*)&field)) -static int autodetect_image_type(image_t *image, char *url) +static int autodetect_image_type(image_t *image, const char *url) { int retval; - fileio_t fileio; + struct fileio fileio; uint32_t read_bytes; uint8_t buffer[9]; @@ -106,7 +106,7 @@ static int autodetect_image_type(image_t *image, char *url) return ERROR_OK; } -static int identify_image_type(image_t *image, char *type_string, char *url) +static int identify_image_type(image_t *image, const char *type_string, const char *url) { if (type_string) { @@ -150,7 +150,7 @@ static int identify_image_type(image_t *image, char *type_string, char *url) static int image_ihex_buffer_complete(image_t *image) { image_ihex_t *ihex = image->type_private; - fileio_t *fileio = &ihex->fileio; + struct fileio *fileio = &ihex->fileio; uint32_t full_address = 0x0; uint32_t cooked_bytes; int i; @@ -502,7 +502,7 @@ static int image_elf_read_section(image_t *image, int section, uint32_t offset, static int image_mot_buffer_complete(image_t *image) { image_mot_t *mot = image->type_private; - fileio_t *fileio = &mot->fileio; + struct fileio *fileio = &mot->fileio; uint32_t full_address = 0x0; uint32_t cooked_bytes; int i; @@ -669,7 +669,7 @@ static int image_mot_buffer_complete(image_t *image) return ERROR_IMAGE_FORMAT_ERROR; } -int image_open(image_t *image, char *url, char *type_string) +int image_open(image_t *image, const char *url, const char *type_string) { int retval = ERROR_OK;