Functions | |
eFsCmdsStatus | e_fscmds_cd (signed short FsNavId, FS_STRING pcStringDirName) |
The cd basic command. More... | |
eFsCmdsStatus | e_fscmds_CheckNavError (void) |
Check the FAT module global var fs_g_status to get the error that occurred in the FAT module. More... | |
eFsCmdsStatus | e_fscmds_format (signed short FsNavId, unsigned short u8DriveId) |
The format basic command: format a disk. More... | |
eExecStatus | e_fscmds_goto_drive (unsigned int u8DriveId, signed short FsNavId, int ac, signed portCHAR **ppcStringReply) |
Shared mount drive command. More... | |
eFsCmdsStatus | e_fscmds_mount (signed short FsNavId, unsigned short u8DriveId) |
The mount basic command: mount a disk. More... | |
eFsCmdsStatus | e_fscmds_rm (signed short FsNavId, const FS_STRING pxStringName, bool bOnlyEmpty) |
The rm basic command. Remove a specified file or a specified directory == rm {-R} {filename,dirname} NOTE: file and directory names can be used with a path. More... | |
eFsCmdsStatus | e_fscmds_rm_all (signed short FsNavId, bool bOnlyEmpty) |
The rm all basic command. Remove all files and directories in current directory == rm {-R} *. More... | |
eExecStatus | e_fscmds_shell_append (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_cat (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The cat command: Print the content of a file. Takes one parameter, that is the filename to cat. Format: cat filename. More... | |
eExecStatus | e_fscmds_shell_cd (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The cd command: Change directory. Takes one parameter, that is the dest directory. Format: cd dirname. More... | |
eExecStatus | e_fscmds_shell_cp (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The cp command: copy a specified file to the bookmarked directory. Takes one parameter, that is the file to copy. Format: cp filename WARNING: paths are not supported; i.e. the parameter must be a filename without path. More... | |
eExecStatus | e_fscmds_shell_df (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_disk (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_fat (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_format (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The format command: format the specified drive. Takes one parameter, that is the drive to format. Format: format drive. More... | |
eExecStatus | e_fscmds_shell_goto (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The goto command: goto the bookmarked directory. Format: goto. More... | |
eExecStatus | e_fscmds_shell_goto_a_drive (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_goto_b_drive (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_goto_c_drive (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_goto_d_drive (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_help (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_ls (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The ls command: list current directory content. Format: ls. More... | |
eExecStatus | e_fscmds_shell_mark (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_mkdir (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_fscmds_shell_mount (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The mount command: mount a disk. Takes one parameter, that is the disk letter. Format: mount {a,b,c,d}. More... | |
eExecStatus | e_fscmds_shell_mv (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The mv command: rename a file or a directory. Takes two parameters, the file to rename as the first parameter and the new name as second parameter. Format: mv src dst WARNING: paths are not supported; i.e. parameters must be filenames without path. More... | |
eExecStatus | e_fscmds_shell_pwd (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The pwd command: return current path. Format: pwd. More... | |
eExecStatus | e_fscmds_shell_rm (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The rm command: remove a specified file or a specified directory or all files and directories. Takes up to two parameters, first an optional parameter to recursively delete directories(i.e. non empty directories may be deleted), and always the parameter which is the file to delete or the directory to delete or *. Format: rm {-R} {file,directory,*} NOTE: file and directory names can be used with a path. WARNING: paths are not supported with *; i.e. the command may only be rm -R * or rm *. More... | |
eExecStatus | e_fscmds_shell_touch (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eFsCmdsStatus | e_fscmds_touch (signed short FsNavId, const FS_STRING pxStringFilename) |
void | v_fscmds_GetStrMsgFromErr (eFsCmdsStatus ErrStatus, signed portCHAR **ppcStringReply) |
Map a string message to an error. More... | |
enum eFsCmdsStatus |
The exec command return status.
eFsCmdsStatus e_fscmds_cd | ( | signed short | FsNavId, |
FS_STRING | pxStringDirName | ||
) |
The cd basic command.
FsNavId | Input. The file system navigator id to use. |
pxStringDirName | Input. The directory name. |
References e_fscmds_CheckNavError(), fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_OK, nav_select(), and nav_setcwd().
Referenced by e_fscmds_shell_cd().
eFsCmdsStatus e_fscmds_CheckNavError | ( | void | ) |
Check the FAT module global var fs_g_status to get the error that occurred in the FAT module.
References FS_ERR_BAD_SIZE_FAT, FS_ERR_DIR_NOT_EMPTY, FS_ERR_FILE_OPEN_WR, FS_ERR_FS, FS_ERR_HW, FS_ERR_HW_NO_PRESENT, FS_ERR_INCORRECT_NAME, FS_ERR_IS_ROOT, FS_ERR_NO_FILE, FS_ERR_NO_FIND, FS_ERR_NO_FORMAT, FS_ERR_NO_FREE_SPACE, FS_ERR_NO_MOUNT, FS_ERR_NO_PART, FS_ERR_NO_SUPPORT_PART, FS_ERR_OUT_LIST, fs_g_status, FS_LUN_WP, FSCMDS_STATUS_ERR_BADSIZEFAT, FSCMDS_STATUS_ERR_DIRNOTEMPTY, FSCMDS_STATUS_ERR_FILENOTFOUND, FSCMDS_STATUS_ERR_FILEWR, FSCMDS_STATUS_ERR_FS, FSCMDS_STATUS_ERR_FSNOTSUPPORTED, FSCMDS_STATUS_ERR_HW, FSCMDS_STATUS_ERR_INCORRECTNAME, FSCMDS_STATUS_ERR_ISROOTDIR, FSCMDS_STATUS_ERR_MEMDEVMISSING, FSCMDS_STATUS_ERR_NOFORMAT, FSCMDS_STATUS_ERR_NOMOUNT, FSCMDS_STATUS_ERR_NOPARTITION, FSCMDS_STATUS_ERR_NOTAFILE, FSCMDS_STATUS_ERR_OUTOFMEM, FSCMDS_STATUS_ERR_READONLY, FSCMDS_STATUS_ERR_UNKNOWN, and NAKED_TRACE_COM2.
Referenced by e_fscmds_cd(), e_fscmds_format(), e_fscmds_mount(), e_fscmds_rm(), e_fscmds_rm_all(), e_fscmds_shell_mkdir(), e_fscmds_shell_mv(), e_fscmds_shell_pwd(), prv_df(), and prvCommonErrorLeave().
eFsCmdsStatus e_fscmds_format | ( | signed short | FsNavId, |
unsigned short | u8DriveId | ||
) |
The format basic command: format a disk.
FsNavId | Input. The file system navigator id to use. |
u8DriveId | Input. The target drive id. |
References e_fscmds_CheckNavError(), FS_FORMAT_DEFAULT, fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_ERR_DRIVE, FSCMDS_STATUS_OK, nav_drive_format(), nav_drive_get(), nav_drive_nb(), nav_drive_set(), nav_filelist_reset(), nav_partition_mount(), and nav_select().
Referenced by b_mmi_format_a(), b_mmi_format_b(), and e_fscmds_shell_format().
eExecStatus e_fscmds_goto_drive | ( | unsigned int | u8DriveId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR ** | ppcStringReply | ||
) |
Shared mount drive command.
u8DriveId | Input. The drive id to mount. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 0. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References e_fscmds_mount(), FSCMDS_ERRMSG_MOUNTSHORT_SYNTAXERROR, FSCMDS_STATUS_OK, NULL, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
Referenced by e_fscmds_shell_goto_a_drive(), e_fscmds_shell_goto_b_drive(), e_fscmds_shell_goto_c_drive(), and e_fscmds_shell_goto_d_drive().
eFsCmdsStatus e_fscmds_mount | ( | signed short | FsNavId, |
unsigned short | u8DriveId | ||
) |
The mount basic command: mount a disk.
FsNavId | Input. The file system navigator id to use. |
u8DriveId | Input. The target drive id. |
References e_fscmds_CheckNavError(), fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_ERR_DRIVE, FSCMDS_STATUS_OK, nav_drive_nb(), nav_drive_set(), nav_partition_mount(), and nav_select().
Referenced by e_fscmds_goto_drive(), and e_fscmds_shell_mount().
eFsCmdsStatus e_fscmds_rm | ( | signed short | FsNavId, |
const FS_STRING | pxStringName, | ||
bool | bOnlyEmpty | ||
) |
The rm basic command.
Remove a specified file or a specified directory == rm {-R} {filename,dirname} NOTE: file and directory names can be used with a path.
FsNavId | Input. The file system navigator id to use. |
pxStringName | Input. The name. |
bOnlyEmpty | Input. Boolean switch between: false(=="non-empty directories can be deleted") and true(=="non-empty directories cannot be deleted") |
References e_fscmds_CheckNavError(), fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_ERR_NOTFOUND, FSCMDS_STATUS_OK, nav_file_del(), nav_getindex(), nav_gotoindex(), nav_select(), and nav_setcwd().
Referenced by e_fscmds_shell_mv(), and e_fscmds_shell_rm().
eFsCmdsStatus e_fscmds_rm_all | ( | signed short | FsNavId, |
bool | bOnlyEmpty | ||
) |
The rm all basic command.
Remove all files and directories in current directory == rm {-R} *.
FsNavId | Input. The file system navigator id to use. |
bOnlyEmpty | Input. Boolean switch between: false(=="non-empty directories can be deleted") and true(=="non-empty directories cannot be deleted") WARNING: paths are not supported with *; i.e. the command may only be rm -R * or rm * |
References e_fscmds_CheckNavError(), FS_DIR, FS_FILE, FS_FIND_NEXT, fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_OK, nav_file_del(), nav_filelist_first(), nav_filelist_reset(), nav_filelist_set(), and nav_select().
Referenced by e_fscmds_shell_rm().
eExecStatus e_fscmds_shell_append | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
eExecStatus e_fscmds_shell_cat | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The cat command: Print the content of a file. Takes one parameter, that is the filename to cat. Format: cat filename.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 1. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References FSCMDS_ERRMSG_CAT_SYNTAXERROR, FSCMDS_STATUS_OK, NULL, prv_cat(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_cd | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The cd command: Change directory. Takes one parameter, that is the dest directory. Format: cd dirname.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. For this command, should be 1. |
av | Input. The argument vector. For this command, only av[0] is considered. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References e_fscmds_cd(), FSCMDS_ERRMSG_CD_SYNTAXERROR, FSCMDS_STATUS_OK, NULL, pvPortMalloc(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, v_fscmds_GetStrMsgFromErr(), and vPortFree().
eExecStatus e_fscmds_shell_cp | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The cp command: copy a specified file to the bookmarked directory. Takes one parameter, that is the file to copy. Format: cp filename WARNING: paths are not supported; i.e. the parameter must be a filename without path.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 1. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References FSCMDS_ERRMSG_CP_SYNTAXERROR, FSCMDS_STATUS_OK, NULL, prv_cp(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_df | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References FSCMDS_ERRMSG_DF_SYNTAXERROR, NULL, prv_df(), SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK.
eExecStatus e_fscmds_shell_disk | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
eExecStatus e_fscmds_shell_fat | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
eExecStatus e_fscmds_shell_format | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The format command: format the specified drive. Takes one parameter, that is the drive to format. Format: format drive.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 1. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References e_fscmds_format(), FSCMDS_ERRMSG_FORMAT_SYNTAXERROR, FSCMDS_ERRMSG_MOUNT_DRIVENOTFOUND, FSCMDS_STATUS_OK, NULL, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_goto | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The goto command: goto the bookmarked directory. Format: goto.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 0. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_ERRMSG_GOTO_SYNTAXERROR, nav_gotoindex(), nav_select(), NULL, prv_i_GetIdxFromModid(), prvCommonErrorLeave(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_goto_a_drive | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References e_fscmds_goto_drive().
eExecStatus e_fscmds_shell_goto_b_drive | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References e_fscmds_goto_drive().
eExecStatus e_fscmds_shell_goto_c_drive | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References e_fscmds_goto_drive().
eExecStatus e_fscmds_shell_goto_d_drive | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References e_fscmds_goto_drive().
eExecStatus e_fscmds_shell_help | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References FSCMDS_MSG_HELP, NULL, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK_NO_FREE.
Referenced by e_Shell_help().
eExecStatus e_fscmds_shell_ls | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The ls command: list current directory content. Format: ls.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 0. |
av | Input. The argument vector. Ignored. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References FSCMDS_ERRMSG_LS_SYNTAXERROR, FSCMDS_STATUS_OK, NULL, prv_ls(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_mark | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
eExecStatus e_fscmds_shell_mkdir | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References e_fscmds_CheckNavError(), FS_DATE_LAST_WRITE, fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_ERRMSG_MKDIR_NAMEEXISTS, FSCMDS_ERRMSG_MKDIR_SYNTAXERROR, nav_dir_make(), nav_file_dateset(), nav_select(), NULL, pcTempoDate, prv_NameExists(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, v_cptime_GetDateInFatStringFormat(), and v_fscmds_GetStrMsgFromErr().
Referenced by b_mmi_mkdir_aLOG(), and b_mmi_mkdir_bLOG().
eExecStatus e_fscmds_shell_mount | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The mount command: mount a disk. Takes one parameter, that is the disk letter. Format: mount {a,b,c,d}.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. For this command, should be 1. |
av | Input. The argument vector. For this command, only av[0] is considered. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References e_fscmds_mount(), FSCMDS_ERRMSG_MOUNT_DRIVENOTFOUND, FSCMDS_ERRMSG_MOUNT_SYNTAXERROR, FSCMDS_STATUS_OK, NULL, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_mv | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The mv command: rename a file or a directory. Takes two parameters, the file to rename as the first parameter and the new name as second parameter. Format: mv src dst WARNING: paths are not supported; i.e. parameters must be filenames without path.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 2. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References e_fscmds_CheckNavError(), e_fscmds_rm(), fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_ERRMSG_MV_SYNTAXERROR, FSCMDS_ERRMSG_MV_TYPEDIFFER, FSCMDS_STATUS_KO, FSCMDS_STATUS_OK, nav_file_isdir(), nav_file_rename(), nav_getindex(), nav_gotoindex(), nav_select(), nav_setcwd(), NULL, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_pwd | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The pwd command: return current path. Format: pwd.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 0. |
av | Input. The argument vector. Ignored. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References CRLF, e_fscmds_CheckNavError(), fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_ERRMSG_LS_SYNTAXERROR, FSCMDS_STATUS_OK, nav_getcwd(), nav_select(), NULL, prv_Print_String_To_Requester_Stream(), pvPortMalloc(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, SHELL_MAX_MSGOUT_LEN, v_fscmds_GetStrMsgFromErr(), v_shell_Print_String_To_Requester_Stream(), and vPortFree().
eExecStatus e_fscmds_shell_rm | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The rm command: remove a specified file or a specified directory or all files and directories. Takes up to two parameters, first an optional parameter to recursively delete directories(i.e. non empty directories may be deleted), and always the parameter which is the file to delete or the directory to delete or *. Format: rm {-R} {file,directory,*} NOTE: file and directory names can be used with a path. WARNING: paths are not supported with *; i.e. the command may only be rm -R * or rm *.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
ac | Input. The argument counter. Should be 1 or 2. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References e_fscmds_rm(), e_fscmds_rm_all(), FSCMDS_ERRMSG_RM_SYNTAXERROR, FSCMDS_STATUS_OK, NULL, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and v_fscmds_GetStrMsgFromErr().
eExecStatus e_fscmds_shell_touch | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
eFsCmdsStatus e_fscmds_touch | ( | signed short | FsNavId, |
const FS_STRING | pxStringFilename | ||
) |
void v_fscmds_GetStrMsgFromErr | ( | eFsCmdsStatus | ErrStatus, |
signed portCHAR ** | ppcStringReply | ||
) |
Map a string message to an error.
ErrStatus | Input. The error status. |
ppcStringReply | Input/Output. The response string. The input is not NULL. |
References FSCMDS_ERRMSG_BADSIZEFAT, FSCMDS_ERRMSG_CD_UNKNOWNDIR, FSCMDS_ERRMSG_DIRNOTEMPTY, FSCMDS_ERRMSG_FILENOTFOUND, FSCMDS_ERRMSG_FILEWR, FSCMDS_ERRMSG_FS, FSCMDS_ERRMSG_FSNOTSUPPORTED, FSCMDS_ERRMSG_HW, FSCMDS_ERRMSG_INCORRECTNAME, FSCMDS_ERRMSG_ISROOTDIR, FSCMDS_ERRMSG_MEMDEVMISSING, FSCMDS_ERRMSG_MOUNT_DRIVENOTFOUND, FSCMDS_ERRMSG_MOUNT_FAILED, FSCMDS_ERRMSG_NOFORMAT, FSCMDS_ERRMSG_NOMOUNT, FSCMDS_ERRMSG_NOPARTITION, FSCMDS_ERRMSG_NOTAFILE, FSCMDS_ERRMSG_NOTFOUND, FSCMDS_ERRMSG_OUTOFMEM, FSCMDS_ERRMSG_READONLYDRIVE, FSCMDS_ERRMSG_UNEXPECTED, FSCMDS_STATUS_ERR_BADSIZEFAT, FSCMDS_STATUS_ERR_DIRNOTEMPTY, FSCMDS_STATUS_ERR_DRIVE, FSCMDS_STATUS_ERR_FILENOTFOUND, FSCMDS_STATUS_ERR_FILEWR, FSCMDS_STATUS_ERR_FS, FSCMDS_STATUS_ERR_FSNOTSUPPORTED, FSCMDS_STATUS_ERR_HW, FSCMDS_STATUS_ERR_INCORRECTNAME, FSCMDS_STATUS_ERR_ISROOTDIR, FSCMDS_STATUS_ERR_MEMALLOC, FSCMDS_STATUS_ERR_MEMDEVMISSING, FSCMDS_STATUS_ERR_MOUNT, FSCMDS_STATUS_ERR_NOFORMAT, FSCMDS_STATUS_ERR_NOMOUNT, FSCMDS_STATUS_ERR_NOPARTITION, FSCMDS_STATUS_ERR_NOTAFILE, FSCMDS_STATUS_ERR_NOTFOUND, FSCMDS_STATUS_ERR_OUTOFMEM, FSCMDS_STATUS_ERR_READONLY, FSCMDS_STATUS_ERR_UNKNOWN, FSCMDS_STATUS_ERR_UNKNOWNDIR, and SHELL_ERRMSG_MEMALLOC.
Referenced by e_fscmds_goto_drive(), e_fscmds_shell_append(), e_fscmds_shell_cat(), e_fscmds_shell_cd(), e_fscmds_shell_cp(), e_fscmds_shell_format(), e_fscmds_shell_goto(), e_fscmds_shell_ls(), e_fscmds_shell_mkdir(), e_fscmds_shell_mount(), e_fscmds_shell_mv(), e_fscmds_shell_pwd(), e_fscmds_shell_rm(), e_fscmds_shell_touch(), and prv_df().