- change error message for image_open error
authormifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 16 Dec 2007 18:19:43 +0000 (18:19 +0000)
committermifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 16 Dec 2007 18:19:43 +0000 (18:19 +0000)
- changed run_size to size_read in argument of image_read_section
(thanks to oyvind Harboe for this patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@234 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/flash/flash.c

index 6c1fbd91539a29b639f3f580e260ad8b84d4dd1e..2271f603cc74bf92eaf81d6ffca8886822898e79 100644 (file)
@@ -563,11 +563,12 @@ int handle_flash_write_image_command(struct command_context_s *cmd_ctx, char *cm
        }
        
        image.start_address_set = 0;
-
-       if (image_open(&image, args[0], (argc == 4) ? args[2] : NULL) != ERROR_OK)
+\r
+       retval = image_open(&image, args[0], (argc == 4) ? args[2] : NULL);
+       if (retval != ERROR_OK)
        {
-               command_print(cmd_ctx, "flash write error: %s", image.error_str);
-               return ERROR_OK;
+               command_print(cmd_ctx, "image_open error: %s", image.error_str);
+               return retval;
        }
        
        failed = malloc(sizeof(int) * image.num_sections);
@@ -849,7 +850,7 @@ int flash_write(target_t *target, image_t *image, u32 *written, char **error_str
                                size_read = image->sections[section].size - section_offset;
                        
                        if ((retval = image_read_section(image, section, section_offset,
-                                       run_size, buffer + buffer_size, &size_read)) != ERROR_OK || size_read == 0)
+                                       size_read, buffer + buffer_size, &size_read)) != ERROR_OK || size_read == 0)
                        {
                                free(buffer);
                                

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)