* 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;
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"));
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",
"<d:/path/filename> <addr> [bytes [pos]]\n"
" - Load binary file 'path/filename' on logical drive 'd'\n"
" 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",
"<d:/path/filename> <addr> <bytes>\n"
" - Write file to 'path/filename' on logical drive 'd' from RAM\n"
),
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"