Bogus error message in GDB removed
[fw/openocd] / src / flash / flash.c
index d61ecf20dac9ef6782ea1c381e1670890f0cb652..92ac6fd6c315c1ee918fb5a2179bec0909557611 100644 (file)
@@ -181,6 +181,17 @@ flash_bank_t *get_flash_bank_by_num_noprobe(int num)
        return NULL;
 }
 
+int flash_get_bank_count()
+{
+       flash_bank_t *p;
+       int i = 0;
+       for (p = flash_banks; p; p = p->next)
+       {
+               i++;
+       }
+       return i;
+}
+
 flash_bank_t *get_flash_bank_by_num(int num)
 {
        flash_bank_t *p = get_flash_bank_by_num_noprobe(num);
@@ -605,7 +616,6 @@ int handle_flash_write_image_command(struct command_context_s *cmd_ctx, char *cm
        retval = image_open(&image, args[0], (argc == 3) ? args[2] : NULL);
        if (retval != ERROR_OK)
        {
-               command_print(cmd_ctx, "image_open error: %s", image.error_str);
                return retval;
        }
 
@@ -662,14 +672,12 @@ int handle_flash_write_bank_command(struct command_context_s *cmd_ctx, char *cmd
 
        if (fileio_open(&fileio, args[1], FILEIO_READ, FILEIO_BINARY) != ERROR_OK)
        {
-               command_print(cmd_ctx, "flash write_binary error: %s", fileio.error_str);
                return ERROR_OK;
        }
 
        buffer = malloc(fileio.size);
        if (fileio_read(&fileio, fileio.size, buffer, &buf_cnt) != ERROR_OK)
        {
-               command_print(cmd_ctx, "flash write_binary error: %s", fileio.error_str);
                return ERROR_OK;
        }