X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/8315e7f4ea0204718e520e48a48739fd0371bd28..82c475ad6fb4a6a7ab77fc05e8953401093cffca:/avr/cmd_fat.c diff --git a/avr/cmd_fat.c b/avr/cmd_fat.c index cd35c8a..90af1be 100644 --- a/avr/cmd_fat.c +++ b/avr/cmd_fat.c @@ -166,7 +166,7 @@ FRESULT scan_files ( * fatstat path - Show logical drive status * */ -command_ret_t do_stat(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * const argv[]) +command_ret_t do_stat(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int argc, char * const argv[]) { FATFS *fs; DWORD nfreeclst; @@ -175,8 +175,6 @@ command_ret_t do_stat(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * cons char *path = ""; struct stat_dat_s statp; - (void) cmdtp; (void) flag; (void) argc; - buf = (char *) malloc(BUFFER_SIZE); if (buf == NULL) { printf_P(PSTR("fat stat: Out of Memory!\n")); @@ -745,32 +743,32 @@ command_ret_t do_cp(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int argc, cmd_tbl_t cmd_tbl_fat[] = { CMD_TBL_ITEM( - stat, 2, CTBL_REPEAT, do_stat, + stat, 2, CTBL_RPT, do_stat, "Show logical drive status", "dev" ), CMD_TBL_ITEM( - pwd, 2, CTBL_REPEAT, do_pwd, + pwd, 2, CTBL_RPT, do_pwd, "Print name of current/working directory", "" ), CMD_TBL_ITEM( - cd, 2, CTBL_REPEAT, do_cd, + cd, 2, 0, do_cd, "Change the current/working directory.", "path" ), CMD_TBL_ITEM( - ls, 2, CTBL_REPEAT, do_ls, + ls, 2, CTBL_RPT, do_ls, "Directory listing", "path" ), CMD_TBL_ITEM( - tst, 2, CTBL_REPEAT, do_tst, + tst, 2, CTBL_DBG|CTBL_RPT, do_tst, "FatFS test function", "path" ), CMD_TBL_ITEM( - load, 5, 0, do_rw, + load, 5, 0, do_rw, "load binary file from a dos filesystem", " [bytes [pos]]\n" " - Load binary file 'path/filename' on logical drive 'd'\n" @@ -781,7 +779,7 @@ CMD_TBL_ITEM( " the load stops on end of file." ), CMD_TBL_ITEM( - write, 4, 0, do_rw, + write, 4, 0, do_rw, "write file into a dos filesystem", " \n" " - Write file to 'path/filename' on logical drive 'd' from RAM\n" @@ -789,14 +787,14 @@ CMD_TBL_ITEM( ), CMD_TBL_ITEM( - cp, CONFIG_SYS_MAXARGS, 0, do_cp, + cp, CONFIG_SYS_MAXARGS, CTBL_DBG, do_cp, "copy files", - "cp [-R] [-f | -i | -n] [-aprv] source_file target_file\n" + "[-R] [-f | -i | -n] [-aprv] source_file target_file\n" " - \n" ), CMD_TBL_ITEM( - help, CONFIG_SYS_MAXARGS, CTBL_REPEAT, do_help, + help, CONFIG_SYS_MAXARGS, CTBL_RPT, do_help, "Print sub command description/usage", "\n" " - print brief description of all sub commands\n"