GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LFS / V1-12-0
Constituent: lfs_lcp     Tag: mv2304
#include "unistd.h"
#include "fcntl.h"
#include "errno.h"
#include "stdio.h"
#include "string.h"
#include "dirent.h"
#include "sys/stat.h"
#include "PBI/Endianness.h"
#include "PBS/WCT.h"
#include "PBS/SEM.h"
#include "PBS/WUT.h"
#include "MSG/MSG_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "ITC/ITC_pubdefs.h"
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include "FBS/FBS_pubrtos.h"
#include "LFS/LFS_cmddefs.h"
#include "LFS/LFS_cmdxtrn.h"
#include "LFS/LFS_tlmdefs.h"
#include "LFS/LFS_msg.h"
#include "QLFS/QLFS.h"
#include "LFS_lcp_private.h"
Include dependency graph for LFS_lcp_command.c:
Defines | |
#define | CREAT(_path, _mode) creat((_path), 0666) |
#define | MKDIR(_path) mkdir((_path), 0777) |
#define | STATFS(_path, _buf) statfs((_path), (_buf)) |
#define | DIR_EXISTS (EEXIST) |
Typedefs | |
typedef statfs | STATFS_T |
Functions | |
static unsigned int | LFS_dumpDir (LFS_Control *ctl, DIR *directory, unsigned int cpu, unsigned int devNum, unsigned int dirNum, unsigned int xactId) |
static unsigned int | LFS_dumpRoot (LFS_Control *ctl, DIR *directory, unsigned int cpu, unsigned int devNum, unsigned int xactId) |
static unsigned int | LFS_dirEmpty (LFS_Control *ctl, unsigned int cpu, unsigned int devNum, unsigned int dirNum, unsigned int xactId) |
unsigned int | LFS_FileDelete (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSFILEDELETE command. | |
unsigned int | LFS_FileCopy (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSFILECOPY command. | |
unsigned int | LFS_DirCreate (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSDIRCREATE command. | |
unsigned int | LFS_DirDelete (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSDIRDELETE command. | |
unsigned int | LFS_FileDumpCTDB (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSFILEDUMPC command. | |
unsigned int | LFS_FileDumpSSR (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSFILEDUMPS command. | |
unsigned int | LFS_DirDump (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSDIRDUMP command. | |
unsigned int | LFS_SysStatus (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSSYSSTATUS command. | |
unsigned int | LFS_SysFormat (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSSYSFORMAT command. | |
unsigned int | LFS_SysCheck (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSSYSCHECK command. | |
unsigned int | LFS_SysRepair (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSSYSREPAIR command. | |
unsigned int | LFS_SysMount (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSSYSMOUNT command. | |
unsigned int | LFS_Noop (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LFSNOOP command. |
|
Portable macro for creat() system call. |
|
Portable errno value for directory overwrite protection. |
|
Portable macro for mkdir() system call. |
|
Portable call to statfs()/statvfs() system call. |
|
Portable definition for statfs/statvfs structure. |
|
Callback function for the LFSDIRCREATE command. After translating the target directory path, the directory is created.
|
|
Callback function for the LFSDIRDELETE command. After translating the target directory path, the directory is deleted.
|
|
Callback function for the LFSDIRDUMP command. The target directory is opened for reading, and either LFS_dumpDir() or LFS_dumpRoot() is called to generate the telemetry response diagnostic packets.
|
|
Sends a single LLFSDIREMPTY telemetry packet to positively acknowledge a LFSDIRDUMP telecommand when the target root or sub directory is empty.
|
|
Dumps the contents of a sub-directory into directory dump telemetry packets. The function is called in response to a LFSDIRDUMP telecommand when the directory number is not '127' (regular subdirectory). A series of LLFSDIRLIST telemetry packets is generated, one for each entry in the directory. Only regular files should be stored here.
|
|
Dumps the contents of the root directory into directory dump telemetry packets. The function is called in response to a LFSDIRDUMP telecommand when the directory number is specified as '127'. A series of LLFSROOTLIST telemetry packets is generated, one for each entry in the device root directory. Only sub-directories should be stored here.
|
|
Callback function for the LFSFILECOPY command. After translating the file system paths, the source file contents are copied to the destination file.
|
|
Callback function for the LFSFILEDELETE command. After translating the target file path, the file is deleted.
|
|
Callback function for the LFSFILEDUMPC command. After translating the file ID to a path, the file is opened for reading and a series of LLFSDUMPCTDB telemetry packets is generated. Each telemetry packet contains a portion of the file data, and the offset and size members provide the attributes of the data contained in each packet. These telemetry packets are delivered to the CTDB interface.
|
|
Callback function for the LFSFILEDUMPS command. After translating the file ID to a path, the file is opened for reading and a series of LLFSDUMPSSR telemetry packets is generated. Each telemetry packet contains a portion of the file data, and the offset and size members provide the attributes of the data contained in each packet. These telemetry packets are delivered to the SSR interface. Each telemetry packet contains one QLFS datagram.
|
|
Callback function for the LFSNOOP command. Do nothing except generate command confirm reply.
|
|
Callback function for the LFSSYSCHECK command. Consistency check an on-board file system by running the 'chkdsk' utility.
|
|
Callback function for the LFSSYSFORMAT command. Re-format an on-board file system. This is potentially dangerous.
|
|
Callback function for the LFSSYSMOUNT command. Manually mount an on-board file system.
|
|
Callback function for the LFSSYSREPAIR command. Repair an on-board file system by running the 'chkdsk' utility with the repair flag set to true.
|
|
Callback function for the LFSSYSSTATUS command. After the target file system status is obtained from the system, a single LLFSSYSREPORT telemetry packet is generated to report the results.
|