diff options
author | Leo C | 2015-05-15 14:59:49 +0200 |
---|---|---|
committer | Leo C | 2015-05-15 14:59:49 +0200 |
commit | bbd45c46a75edd930486980c0d6a94c52d8cf403 (patch) | |
tree | 6252a31b5ab322bfb9e05918fb8058f78c33d902 /avr/cmd_loadcpm3.c | |
parent | 5f7f3586b0444116d5c1340465ecae8d6daa2461 (diff) | |
download | z180-stamp-bbd45c46a75edd930486980c0d6a94c52d8cf403.zip |
fatfs f_mount now allways done globally at start up
Diffstat (limited to 'avr/cmd_loadcpm3.c')
-rw-r--r-- | avr/cmd_loadcpm3.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/avr/cmd_loadcpm3.c b/avr/cmd_loadcpm3.c index f2a30f1..fd685b2 100644 --- a/avr/cmd_loadcpm3.c +++ b/avr/cmd_loadcpm3.c @@ -65,7 +65,6 @@ command_ret_t do_loadcpm3(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg uint16_t osentry_adr = 0; long offset = 0; char *fname; - FATFS FatFs; FIL File; /* TODO: put CONFIG_PATH_CPM3SYS in flash */ char default_fname[] = CONFIG_PATH_CPM3SYS; @@ -88,12 +87,9 @@ command_ret_t do_loadcpm3(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg if (fname == NULL || *fname == '\0') fname = default_fname; - res = f_mount(&FatFs, fname, 0); - if (!res) - res = f_open(&File, fname, FA_READ ); + res = f_open(&File, fname, FA_READ ); if (res) { printf_P(PSTR("Error: failed to open '%s'\n"), fname); - f_mount(NULL, fname, 0); return CMD_RET_FAILURE; } @@ -132,7 +128,6 @@ command_ret_t do_loadcpm3(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg out: f_close(&File); - f_mount(NULL, fname, 0); if (res) { printf_P(PSTR("Error: failed to read '%s'\n"), fname); |