/* TODO: detect_ramsize() should be moved to z80-if.c */
#define MAX_MEMORY CONFIG_SYS_RAMSIZE_MAX
#define BUFFER_SIZE 512
+#define MAX_PATHLEN CONFIG_SYS_MAX_PATHLEN
+typedef struct {
+ char *p_end; /* pointer to NULL at end of path */
+ char p_path[MAX_PATHLEN + 1]; /* pointer to the start of a path */
+} PATH_T;
+
/*
* Multible (fat) partitions per physical drive are not supported,
* but we have up to 2 sdcard slots.
FATFS FatFs0;
FATFS FatFs1;
+uint8_t *blockbuf;
+int blockbuf_size;
+PATH_T from;
+PATH_T to;
command_ret_t command_ret;
void setup_fatfs(void)
return CMD_RET_SUCCESS;
}
-#define MAX_PATHLEN CONFIG_SYS_MAX_PATHLEN
/*
* Remove trailing slashes,
*/
-typedef struct {
- char *p_end; /* pointer to NULL at end of path */
- char p_path[MAX_PATHLEN + 1]; /* pointer to the start of a path */
-} PATH_T;
-
static void strip_trailing_slash(PATH_T *p)
{
char *beg = p->p_path;
static uint8_t flags;
-PATH_T from;
-PATH_T to;
-//PATH_T *from = &from_static;
-//PATH_T *to = &to_static;
-static uint8_t *blockbuf;
-static int blockbuf_size;
-
#define F_FLAG (1<<3) // overwrite existing file ignoring write protection
#define I_FLAG (1<<1) // prompt before overwrite (overrides a previous -n option)
#define N_FLAG (1<<2) // do not overwrite an existing file (overrides a previous -i option)