diff options
author | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2006-07-17 14:13:27 +0000 |
---|---|---|
committer | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2006-07-17 14:13:27 +0000 |
commit | 82d2633b5f550115e9e7c7d0520babb6680aa38f (patch) | |
tree | fa9895a6117d4a238be1b76293edcc7de11a88c2 /src/flash/flash.c | |
parent | 1960973baf8022b4525e3ac94aed8dace7f9b478 (diff) |
- Added support for native MinGW builds (thanks to Spencer Oliver and Michael Fischer) - you still need to install GiveIO (not part of OpenOCD)
- Added state-move support to ftd2xx and bitbang JTAG drivers (required for XScale, possibly useful for other targets, too)
- various fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@78 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/flash.c')
-rw-r--r-- | src/flash/flash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c index a5067cd2..0a713093 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -17,6 +17,10 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "flash.h" #include "command.h" #include "log.h" @@ -506,7 +510,7 @@ int handle_flash_write_command(struct command_context_s *cmd_ctx, char *cmd, cha return ERROR_OK; } - if (!(binary = fopen(args[1], "r"))) + if (!(binary = fopen(args[1], "rb"))) { ERROR("couldn't open %s: %s", args[1], strerror(errno)); command_print(cmd_ctx, "couldn't open %s", args[1]); |