#include <string.h>
#include <math.h>
#include "compiler.h"
#include "board.h"
#include "shell.h"
#include "sensor.h"
#include "actuator.h"
#include "fsaccess.h"
#include "fscmds.h"
#include "supervisor.h"
#include "com1shell.h"
#include "tracedump.h"
Functions | |
eFsCmdsStatus | e_fscmds_cd (signed short FsNavId, FS_STRING pxStringDirName) |
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) |
static eFsCmdsStatus | prv_append (eModId xModId, signed short FsNavId, const FS_STRING pxStringFilename) |
The append basic command. More... | |
static eFsCmdsStatus | prv_cat (eModId xModId, signed short FsNavId, const FS_STRING pStringFilename) |
The cat basic command. More... | |
static eFsCmdsStatus | prv_cp (eModId xModId, signed short FsNavId, const FS_STRING pStringFilename) |
The cp basic command. More... | |
static eFsCmdsStatus | prv_df (eModId xModId, signed short FsNavId) |
The df basic command Display free space information for all connected drives. More... | |
static signed portCHAR | prv_GetChar_From_Requester_Stream (eModId xModId) |
Get a char from the input stream of a module. More... | |
static int | prv_i_GetIdxFromModid (eModId xModId) |
return x from a 2powx number. More... | |
static eFsCmdsStatus | prv_ls (eModId xModId, signed short FsNavId) |
The ls basic command. More... | |
static bool | prv_NameExists (const FS_STRING pxStringName) |
Check if a file and/or directory already exists in the current directory. More... | |
static void | prv_Print_String_To_Requester_Stream (eModId xModId, const portCHAR *pStringToPrint) |
Print a string directly to the output stream of a module. More... | |
static void | prv_PutChar_To_Requester_Stream (eModId xModId, signed portCHAR c) |
Put a char to the output stream of a module. More... | |
static eFsCmdsStatus | prvCommonErrorLeave (void) |
Common upon-error-prologue of several functions. More... | |
void | v_fscmds_GetStrMsgFromErr (eFsCmdsStatus ErrStatus, signed portCHAR **ppcStringReply) |
Map a string message to an error. More... | |
Variables | |
static Fs_index | ax_mark_index [SYS_NB_MOD] |
const signed portCHAR *const | FSCMDS_ERRMSG_APPEND_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: append filename"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_BADSIZEFAT = (signed portCHAR *)ERROR_CRLF"Unsupported drive size"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_CAT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: cat filename"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_CD_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: cd dirname"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_CD_UNKNOWNDIR = (signed portCHAR *)ERROR_CRLF"Unknown directory"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_CP_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: cp filename"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_DF_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: df"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_DIRNOTEMPTY = (signed portCHAR *)ERROR_CRLF"Directory not empty."CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_DISK_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: disk"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_FAT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: fat"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_FILENOTFOUND = (signed portCHAR *)ERROR_CRLF"File not found"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_FILEWR = (signed portCHAR *)ERROR_CRLF"File currently opened in write-mode"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_FORMAT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: format {a,b,c,d}"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_FS = (signed portCHAR *)ERROR_CRLF"File system error"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_FSNOTSUPPORTED = (signed portCHAR *)ERROR_CRLF"Unsupported file system"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_GOTO_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: goto"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_HELP_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: help"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_HW = (signed portCHAR *)ERROR_CRLF"Hardware error"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_INCORRECTNAME = (signed portCHAR *)ERROR_CRLF"Incorrect name, this must be not contain char \\/:*?\"<>|"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_ISROOTDIR = (signed portCHAR *)ERROR_CRLF"Current dir is a root dir."CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_LS_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: ls"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MAINTENANCE = (signed portCHAR *)ERROR_CRLF"File system access forbidden(Maintenance mode)"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MARK_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mark"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MEMDEVMISSING = (signed portCHAR *)ERROR_CRLF"Memory device is missing"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MKDIR_NAMEEXISTS = (signed portCHAR *)ERROR_CRLF"Name already used."CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MKDIR_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mkdir dirname"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MOUNT_DRIVENOTFOUND = (signed portCHAR *)ERROR_CRLF"Drive not found."CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MOUNT_FAILED = (signed portCHAR *)ERROR_CRLF"Unable to mount drive"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MOUNT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mount {a,b,c,d}"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MOUNTSHORT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: {a:,b:,c:,d:}"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MV_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mv src dst"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_MV_TYPEDIFFER = (signed portCHAR *)ERROR_CRLF"Src & dst must be of the same type."CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_NOFORMAT = (signed portCHAR *)ERROR_CRLF"Current drive is not formatted"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_NOMOUNT = (signed portCHAR *)ERROR_CRLF"No drive mounted"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_NOPARTITION = (signed portCHAR *)ERROR_CRLF"The selected partition doesn't exist"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_NOTAFILE = (signed portCHAR *)ERROR_CRLF"Not a file"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_NOTFOUND = (signed portCHAR *)ERROR_CRLF"File or directory not found"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_OUTOFMEM = (signed portCHAR *)ERROR_CRLF"Operation cancelled: out of memory"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_READONLYDRIVE = (signed portCHAR *)ERROR_CRLF"Drive is read-only"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_RM_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: rm {-R} {filename,dirname,*}"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_TOUCH_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: touch filename"CRLF |
const signed portCHAR *const | FSCMDS_ERRMSG_UNEXPECTED = (signed portCHAR *)ERROR_CRLF"Unexpected error"CRLF |
const signed portCHAR *const | FSCMDS_MSG_APPEND_WELCOME = (signed portCHAR *)CRLF"Simple text editor, enter char to append, ^q to exit and save"CRLF |
const signed portCHAR *const | FSCMDS_MSG_HELP |
static portCHAR | str_ascii [MAX_FILE_PATH_LENGTH] |
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 | ||
) |
|
static |
The append basic command.
xModId | Input. The module associated with the target output stream. |
FsNavId | Input. The file system navigator id to use. |
pxStringFilename | Input. The filename. |
References CR, CRLF, file_close(), file_open(), file_putc(), FOPEN_MODE_APPEND, FS_DATE_LAST_WRITE, fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_MSG_APPEND_WELCOME, FSCMDS_STATUS_ERR_FILENOTFOUND, FSCMDS_STATUS_OK, LF, nav_file_dateset(), nav_getindex(), nav_gotoindex(), nav_select(), nav_setcwd(), pcTempoDate, prv_GetChar_From_Requester_Stream(), prv_PutChar_To_Requester_Stream(), prvCommonErrorLeave(), QUIT_APPEND, v_cptime_GetDateInFatStringFormat(), and v_shell_Print_String_To_Requester_Stream().
Referenced by e_fscmds_shell_append().
|
static |
The cat basic command.
xModId | Input. The module associated with the target output stream. |
FsNavId | Input. The file system navigator id to use. |
pStringFilename | Input. The filename. |
References CRLF, file_close(), file_open(), FOPEN_MODE_R, FS_SIZE_OF_SECTOR, fsaccess_file_get_size(), fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_ERR_FILENOTFOUND, FSCMDS_STATUS_ERR_MEMALLOC, FSCMDS_STATUS_OK, nav_getindex(), nav_gotoindex(), nav_select(), nav_setcwd(), NULL, prvCommonErrorLeave(), pvPortMalloc(), read, TRACE_COM2, v_shell_Print_String_To_Requester_Stream(), and vPortFree().
Referenced by e_fscmds_shell_cat().
|
static |
The cp basic command.
xModId | Input. The module associated with the target output stream. |
FsNavId | Input. The file system navigator id to use. |
pStringFilename | Input. The filename to copy. |
References COPY_BUSY, FS_NAME_GET, fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_ERR_FILENOTFOUND, FSCMDS_STATUS_OK, MAX_FILE_PATH_LENGTH, nav_file_copy(), nav_file_lgtsector(), nav_file_name(), nav_file_paste_start(), nav_file_paste_state(), nav_getindex(), nav_gotoindex(), nav_partition_space(), nav_select(), nav_setcwd(), prv_i_GetIdxFromModid(), and prvCommonErrorLeave().
Referenced by e_fscmds_shell_cp().
|
static |
The df basic command
Display free space information for all connected drives.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
References CRLF, e_fscmds_CheckNavError(), FS_SHIFT_B_TO_SECTOR, fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_ERR_MEMALLOC, FSCMDS_STATUS_OK, mem_name(), nav_drive_nb(), nav_drive_set(), nav_getindex(), nav_gotoindex(), nav_partition_freespace(), nav_partition_mount(), nav_partition_space(), nav_select(), NULL, pvPortMalloc(), SHELL_MAX_MSGOUT_LEN, sprintf(), v_fscmds_GetStrMsgFromErr(), v_shell_Print_String_To_Requester_Stream(), and vPortFree().
Referenced by e_fscmds_shell_df().
|
static |
Get a char from the input stream of a module.
xModId | Input. The module associated with the target input stream. |
References com1shell_GetChar(), pdFALSE, SYS_MODID_COM1SHELL, SYS_MODID_USB, and TRACE_COM2.
Referenced by prv_append().
|
static |
return x from a 2powx number.
xModId | Module id, which is a 2powx number. |
Referenced by e_fscmds_shell_goto(), e_fscmds_shell_mark(), and prv_cp().
|
static |
The ls basic command.
xModId | Input. The module that is calling this function. |
FsNavId | Input. The file system navigator id to use. |
References CRLF, FS_DIR, FS_FILE, FS_FIND_NEXT, FS_NAME_GET, fsaccess_give_mutex(), fsaccess_take_mutex(), FSCMDS_STATUS_ERR_MEMALLOC, FSCMDS_STATUS_OK, MAX_FILE_PATH_LENGTH, mem_name(), nav_dir_name(), nav_drive_get(), nav_file_isdir(), nav_file_lgt(), nav_file_name(), nav_filelist_first(), nav_filelist_nb(), nav_filelist_reset(), nav_filelist_set(), nav_select(), NULL, prv_Print_String_To_Requester_Stream(), prvCommonErrorLeave(), pvPortMalloc(), SHELL_MAX_MSGOUT_LEN, sprintf(), str_ascii, v_shell_Print_String_To_Requester_Stream(), and vPortFree().
Referenced by e_fscmds_shell_ls().
Check if a file and/or directory already exists in the current directory.
pxStringName | Input. The filename to compare against. |
References FS_DIR, FS_FILE, FS_FIND_NEXT, FS_NAME_GET, MAX_FILE_PATH_LENGTH, nav_file_name(), nav_filelist_first(), nav_filelist_nb(), nav_filelist_set(), and str_ascii.
Referenced by e_fscmds_shell_mkdir().
|
static |
Print a string directly to the output stream of a module.
xModId | Input. The module associated with the target output stream. |
pStringToPrint | Input. The string to print. |
References SYS_MODID_COM1SHELL, SYS_MODID_USB, TRACE_COM2, and vcom1shell_PrintMsg().
Referenced by e_fscmds_shell_pwd(), and prv_ls().
Put a char to the output stream of a module.
xModId | Input. The module associated with the target output stream. |
c | Input. The char to put to the target output stream. |
References SYS_MODID_COM1SHELL, SYS_MODID_USB, TRACE_COM2, and vcom1shell_PutChar().
Referenced by prv_append().
|
static |
Common upon-error-prologue of several functions.
References e_fscmds_CheckNavError(), and fsaccess_give_mutex().
Referenced by e_fscmds_shell_goto(), prv_append(), prv_cat(), prv_cp(), and prv_ls().
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().
|
static |
Array of index for each possible fs shell clients.
const signed portCHAR* const FSCMDS_ERRMSG_APPEND_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: append filename"CRLF |
Error msg upon append syntax error.
Referenced by e_fscmds_shell_append().
const signed portCHAR* const FSCMDS_ERRMSG_BADSIZEFAT = (signed portCHAR *)ERROR_CRLF"Unsupported drive size"CRLF |
Error msg if the disk size is smaller than 4,1MB, or not supported by file system selected.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_CAT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: cat filename"CRLF |
Error msg upon cat syntax error.
Referenced by e_fscmds_shell_cat().
const signed portCHAR* const FSCMDS_ERRMSG_CD_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: cd dirname"CRLF |
Error msg upon cd syntax error.
Referenced by e_fscmds_shell_cd().
const signed portCHAR* const FSCMDS_ERRMSG_CD_UNKNOWNDIR = (signed portCHAR *)ERROR_CRLF"Unknown directory"CRLF |
Error msg upon unknown directory.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_CP_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: cp filename"CRLF |
Error msg upon cp syntax error.
Referenced by e_fscmds_shell_cp().
const signed portCHAR* const FSCMDS_ERRMSG_DF_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: df"CRLF |
Error msg upon df syntax error.
Referenced by e_fscmds_shell_df().
const signed portCHAR* const FSCMDS_ERRMSG_DIRNOTEMPTY = (signed portCHAR *)ERROR_CRLF"Directory not empty."CRLF |
Error msg upon rm of a non-empty directory error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_DISK_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: disk"CRLF |
Error msg upon disk syntax error.
Referenced by e_fscmds_shell_disk().
const signed portCHAR* const FSCMDS_ERRMSG_FAT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: fat"CRLF |
Error msg upon fat syntax error.
Referenced by e_fscmds_shell_fat().
const signed portCHAR* const FSCMDS_ERRMSG_FILENOTFOUND = (signed portCHAR *)ERROR_CRLF"File not found"CRLF |
Error msg upon file not found.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_FILEWR = (signed portCHAR *)ERROR_CRLF"File currently opened in write-mode"CRLF |
Error msg if we try to read from or write to a file that is currently already opened in write mode.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_FORMAT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: format {a,b,c,d}"CRLF |
Error msg upon format syntax error.
Referenced by e_fscmds_shell_format().
const signed portCHAR* const FSCMDS_ERRMSG_FS = (signed portCHAR *)ERROR_CRLF"File system error"CRLF |
Error msg upon file system error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_FSNOTSUPPORTED = (signed portCHAR *)ERROR_CRLF"Unsupported file system"CRLF |
Error msg upon unsupported file system error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_GOTO_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: goto"CRLF |
Error msg upon goto syntax error.
Referenced by e_fscmds_shell_goto().
const signed portCHAR* const FSCMDS_ERRMSG_HELP_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: help"CRLF |
Error msg upon help syntax error.
const signed portCHAR* const FSCMDS_ERRMSG_HW = (signed portCHAR *)ERROR_CRLF"Hardware error"CRLF |
Error msg upon hardware error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_INCORRECTNAME = (signed portCHAR *)ERROR_CRLF"Incorrect name, this must be not contain char \\/:*?\"<>|"CRLF |
Error msg upon incorrect file name format error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_ISROOTDIR = (signed portCHAR *)ERROR_CRLF"Current dir is a root dir."CRLF |
Error msg upon mkdir syntax error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_LS_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: ls"CRLF |
Error msg upon ls syntax error.
Referenced by e_fscmds_shell_ls(), and e_fscmds_shell_pwd().
const signed portCHAR* const FSCMDS_ERRMSG_MAINTENANCE = (signed portCHAR *)ERROR_CRLF"File system access forbidden(Maintenance mode)"CRLF |
Error msg when in maintenance mode.
const signed portCHAR* const FSCMDS_ERRMSG_MARK_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mark"CRLF |
Error msg upon mark syntax error.
Referenced by e_fscmds_shell_mark().
const signed portCHAR* const FSCMDS_ERRMSG_MEMDEVMISSING = (signed portCHAR *)ERROR_CRLF"Memory device is missing"CRLF |
Error msg upon memory device miss error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_MKDIR_NAMEEXISTS = (signed portCHAR *)ERROR_CRLF"Name already used."CRLF |
Error msg upon mkdir syntax error.
Referenced by e_fscmds_shell_mkdir().
const signed portCHAR* const FSCMDS_ERRMSG_MKDIR_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mkdir dirname"CRLF |
Error msg upon mkdir syntax error.
Referenced by e_fscmds_shell_mkdir().
const signed portCHAR* const FSCMDS_ERRMSG_MOUNT_DRIVENOTFOUND = (signed portCHAR *)ERROR_CRLF"Drive not found."CRLF |
Error msg upon mount of an unknown drive.
Referenced by e_fscmds_shell_format(), e_fscmds_shell_mount(), and v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_MOUNT_FAILED = (signed portCHAR *)ERROR_CRLF"Unable to mount drive"CRLF |
Error msg upon mount failure.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_MOUNT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mount {a,b,c,d}"CRLF |
const signed portCHAR* const FSCMDS_ERRMSG_MOUNTSHORT_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: {a:,b:,c:,d:}"CRLF |
Error msg upon {a:,b:,c:,d:} syntax error.
Referenced by e_fscmds_goto_drive().
const signed portCHAR* const FSCMDS_ERRMSG_MV_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: mv src dst"CRLF |
Error msg upon mv syntax error.
Referenced by e_fscmds_shell_mv().
const signed portCHAR* const FSCMDS_ERRMSG_MV_TYPEDIFFER = (signed portCHAR *)ERROR_CRLF"Src & dst must be of the same type."CRLF |
Error msg upon mv of different file types.
Referenced by e_fscmds_shell_mv().
const signed portCHAR* const FSCMDS_ERRMSG_NOFORMAT = (signed portCHAR *)ERROR_CRLF"Current drive is not formatted"CRLF |
Error msg upon unformatted drive error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_NOMOUNT = (signed portCHAR *)ERROR_CRLF"No drive mounted"CRLF |
Error msg if no drive is currently mounted.
Referenced by e_fscmds_shell_fat(), and v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_NOPARTITION = (signed portCHAR *)ERROR_CRLF"The selected partition doesn't exist"CRLF |
Error msg upon selected partition not found error.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_NOTAFILE = (signed portCHAR *)ERROR_CRLF"Not a file"CRLF |
Error msg if a file was expected and it's not.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_NOTFOUND = (signed portCHAR *)ERROR_CRLF"File or directory not found"CRLF |
Error msg upon file or directory not found.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_OUTOFMEM = (signed portCHAR *)ERROR_CRLF"Operation cancelled: out of memory"CRLF |
Error msg upon out of memory event.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_READONLYDRIVE = (signed portCHAR *)ERROR_CRLF"Drive is read-only"CRLF |
Error msg if a drive we wanted to write to is read-only .
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_ERRMSG_RM_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: rm {-R} {filename,dirname,*}"CRLF |
Error msg upon rm syntax error.
Referenced by e_fscmds_shell_rm().
const signed portCHAR* const FSCMDS_ERRMSG_TOUCH_SYNTAXERROR = (signed portCHAR *)ERROR_CRLF"Usage: touch filename"CRLF |
Error msg upon touch syntax error.
Referenced by e_fscmds_shell_touch().
const signed portCHAR* const FSCMDS_ERRMSG_UNEXPECTED = (signed portCHAR *)ERROR_CRLF"Unexpected error"CRLF |
Unexpected error msg: SHOULD NEVER HAPPEN.
Referenced by v_fscmds_GetStrMsgFromErr().
const signed portCHAR* const FSCMDS_MSG_APPEND_WELCOME = (signed portCHAR *)CRLF"Simple text editor, enter char to append, ^q to exit and save"CRLF |
String messages.
Referenced by prv_append().
const signed portCHAR* const FSCMDS_MSG_HELP |
Referenced by e_fscmds_shell_help().
|
static |
Temporary buffer holding a string.
Referenced by prv_ls(), and prv_NameExists().