image_elf_t -> struct image_elf
[openocd.git] / src / target / image.c
index 0247310f637f84e1c789d4c609c148cdddff99ac..27d8eca5e6ff5f2bf860344cf700d9b0b92c36b2 100644 (file)
@@ -149,7 +149,7 @@ static int identify_image_type(image_t *image, const char *type_string, const ch
 
 static int image_ihex_buffer_complete(image_t *image)
 {
-       image_ihex_t *ihex = image->type_private;
+       struct image_ihex *ihex = image->type_private;
        struct fileio *fileio = &ihex->fileio;
        uint32_t full_address = 0x0;
        uint32_t cooked_bytes;
@@ -359,7 +359,7 @@ static int image_ihex_buffer_complete(image_t *image)
 
 static int image_elf_read_headers(image_t *image)
 {
-       image_elf_t *elf = image->type_private;
+       struct image_elf *elf = image->type_private;
        uint32_t read_bytes;
        uint32_t i,j;
        int retval;
@@ -460,7 +460,7 @@ static int image_elf_read_headers(image_t *image)
 
 static int image_elf_read_section(image_t *image, int section, uint32_t offset, uint32_t size, uint8_t *buffer, uint32_t *size_read)
 {
-       image_elf_t *elf = image->type_private;
+       struct image_elf *elf = image->type_private;
        Elf32_Phdr *segment = (Elf32_Phdr *)image->sections[section].private;
        uint32_t read_size,really_read;
        int retval;
@@ -501,7 +501,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;
+       struct image_mot *mot = image->type_private;
        struct fileio *fileio = &mot->fileio;
        uint32_t full_address = 0x0;
        uint32_t cooked_bytes;
@@ -680,9 +680,9 @@ int image_open(image_t *image, const char *url, const char *type_string)
 
        if (image->type == IMAGE_BINARY)
        {
-               image_binary_t *image_binary;
+               struct image_binary *image_binary;
 
-               image_binary = image->type_private = malloc(sizeof(image_binary_t));
+               image_binary = image->type_private = malloc(sizeof(struct image_binary));
 
                if ((retval = fileio_open(&image_binary->fileio, url, FILEIO_READ, FILEIO_BINARY)) != ERROR_OK)
                {
@@ -697,9 +697,9 @@ int image_open(image_t *image, const char *url, const char *type_string)
        }
        else if (image->type == IMAGE_IHEX)
        {
-               image_ihex_t *image_ihex;
+               struct image_ihex *image_ihex;
 
-               image_ihex = image->type_private = malloc(sizeof(image_ihex_t));
+               image_ihex = image->type_private = malloc(sizeof(struct image_ihex));
 
                if ((retval = fileio_open(&image_ihex->fileio, url, FILEIO_READ, FILEIO_TEXT)) != ERROR_OK)
                {
@@ -715,9 +715,9 @@ int image_open(image_t *image, const char *url, const char *type_string)
        }
        else if (image->type == IMAGE_ELF)
        {
-               image_elf_t *image_elf;
+               struct image_elf *image_elf;
 
-               image_elf = image->type_private = malloc(sizeof(image_elf_t));
+               image_elf = image->type_private = malloc(sizeof(struct image_elf));
 
                if ((retval = fileio_open(&image_elf->fileio, url, FILEIO_READ, FILEIO_BINARY)) != ERROR_OK)
                {
@@ -740,7 +740,7 @@ int image_open(image_t *image, const char *url, const char *type_string)
                        return ERROR_FAIL;
                }
 
-               image_memory_t *image_memory;
+               struct image_memory *image_memory;
 
                image->num_sections = 1;
                image->sections = malloc(sizeof(struct image_section));
@@ -748,7 +748,7 @@ int image_open(image_t *image, const char *url, const char *type_string)
                image->sections[0].size = 0xffffffff;
                image->sections[0].flags = 0;
 
-               image_memory = image->type_private = malloc(sizeof(image_memory_t));
+               image_memory = image->type_private = malloc(sizeof(struct image_memory));
 
                image_memory->target = target;
                image_memory->cache = NULL;
@@ -756,9 +756,9 @@ int image_open(image_t *image, const char *url, const char *type_string)
        }
        else if (image->type == IMAGE_SRECORD)
        {
-               image_mot_t *image_mot;
+               struct image_mot *image_mot;
 
-               image_mot = image->type_private = malloc(sizeof(image_mot_t));
+               image_mot = image->type_private = malloc(sizeof(struct image_mot));
 
                if ((retval = fileio_open(&image_mot->fileio, url, FILEIO_READ, FILEIO_TEXT)) != ERROR_OK)
                {
@@ -811,7 +811,7 @@ int image_read_section(image_t *image, int section, uint32_t offset, uint32_t si
 
        if (image->type == IMAGE_BINARY)
        {
-               image_binary_t *image_binary = image->type_private;
+               struct image_binary *image_binary = image->type_private;
 
                /* only one section in a plain binary */
                if (section != 0)
@@ -842,7 +842,7 @@ int image_read_section(image_t *image, int section, uint32_t offset, uint32_t si
        }
        else if (image->type == IMAGE_MEMORY)
        {
-               image_memory_t *image_memory = image->type_private;
+               struct image_memory *image_memory = image->type_private;
                uint32_t address = image->sections[section].base_address + offset;
 
                *size_read = 0;
@@ -938,13 +938,13 @@ void image_close(image_t *image)
 {
        if (image->type == IMAGE_BINARY)
        {
-               image_binary_t *image_binary = image->type_private;
+               struct image_binary *image_binary = image->type_private;
 
                fileio_close(&image_binary->fileio);
        }
        else if (image->type == IMAGE_IHEX)
        {
-               image_ihex_t *image_ihex = image->type_private;
+               struct image_ihex *image_ihex = image->type_private;
 
                fileio_close(&image_ihex->fileio);
 
@@ -956,7 +956,7 @@ void image_close(image_t *image)
        }
        else if (image->type == IMAGE_ELF)
        {
-               image_elf_t *image_elf = image->type_private;
+               struct image_elf *image_elf = image->type_private;
 
                fileio_close(&image_elf->fileio);
 
@@ -974,7 +974,7 @@ void image_close(image_t *image)
        }
        else if (image->type == IMAGE_MEMORY)
        {
-               image_memory_t *image_memory = image->type_private;
+               struct image_memory *image_memory = image->type_private;
 
                if (image_memory->cache)
                {
@@ -984,7 +984,7 @@ void image_close(image_t *image)
        }
        else if (image->type == IMAGE_SRECORD)
        {
-               image_mot_t *image_mot = image->type_private;
+               struct image_mot *image_mot = image->type_private;
 
                fileio_close(&image_mot->fileio);
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)