📄 fss.het
字号:
#ifndef FSS_HET#define FSS_HET/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*//* *//* General C or POSIX structures *//* *//*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*//* Definition of file structure *//*------------------------------*//* Fake structure used like a file structure */typedef struct st_FileFake { u32 v_FakeFile; void* p_FakeFile; } t_FileFake; typedef struct st_FILE { u32 v_FakeFile; void* p_FakeFile; } t_FILE;#ifndef t_fssFILE/* Definition of file mode *//*-------------------------*/typedef struct st_fss_FileMode { u32 v_WriteEnabled : 1; u32 v_ReadEnabled : 1; u32 v_OpenAppend : 1; u32 v_CreationEnabled : 1; u32 v_EmptyedOnOpen : 1; u32 v_BuffMode : 2; u32 v_Unused:20; } t_fss_FileMode;typedef struct st_fss_VolStruct { char * p_VolName; /* Pointer on volume name string */ void * p_FileList; /* Pointer on queue of open files of volume */ void * p_DirList; /* Pointer on queue of open directories of volume */ void * p_IOBuffMngt; /* IO buffer management configuration for the volume */ void * p_LayerCommunication; /* Structure which compose the interlayer table contains for every layer: - its context pointer - the pointer on function/level table - the level of the layer - the number of commands of the lower layer */ u16 v_VolID; /* ID of the volume */ u16 v_FsOffsetInFile; /* Fm file header size */ u8 v_VolNameLength; /* Length of volume name */ u8 v_FreezeCounter; /* Number of freeze occurences for the volume */ MC_PCC_FILL_STRUCT2 } t_fss_VolStruct ;/* Definition of file structure *//*------------------------------*/typedef struct st_fssFILE { struct st_fssFILE * p_VolNextPtr; /* Pointer on next stream in open streams queue of volume */ struct st_fssFILE * p_VolPrecPtr; /* Pointer on prec stream in open streams queue of volume */ struct st_fssFILE * p_EntityNextPtr; /* Pointer on next stream in open streams queue of entity's */ struct st_fssFILE * p_EntityPrecPtr; /* Pointer on prec stream in open streams queue of entity's */ void * p_Entity; /* Pointer on entity's CB */ t_fss_VolStruct * p_VolOfFile; /* Pointer on volume structure of the file */ void * p_IoBuff; /* Pointer on IO buffer characteristics */ s32 v_FilePosition; s32 v_FileSize; t_fss_FileMode s_OpenMode; /* Open mode of file */ u32 v_FileID; /* File identifier */ u16 v_Pattern; /* Pattern to identify if structure is a FILE struct */ u8 v_EndOfFile:1; /* End of file indicator */ u8 v_OperationExecuted:1; /* An operation was executed on the file */ u8 v_StreamState:2; /* State of the stream ( NO, IN_WRITE, IN_READ ) */ u8 v_NotUsed:4; MC_PCC_FILL_STRUCT1 } t_fssFILE;#endif/* Definition of dir structure *//*------------------------------*//* Fake structure used like a file structure */typedef struct st_DirFake { u32 v_FakeDir; void* p_FakeDir; } t_DirFake; typedef struct st_DIR { u32 v_FakeDir; void* p_FakeDir; } t_DIR; #ifndef t_fssDIR#define t_fssDIR t_DirFake#endif/* Definition of directory entry structure ( update by readdir ) *//*---------------------------------------------------------------*/typedef struct st_fss_dirent { ascii d_name[ALIGN(FSS_NAME_MAX)]; } t_fss_dirent;/* Path for the file system server *//*---------------------------------*/typedef ascii fssPath ;/* Volume name for the file system server *//*----------------------------------------*/typedef ascii fssVolName;/* Definition of a size *//*----------------------*/typedef s32 t_fss_size_t;/* Definition of the stat structure *//*----------------------------------*/typedef s32 t_fss_off_t ; typedef u32 t_fss_mod_t ; /* "t_fss_off_t" is a bit field off permission bits and type of object */typedef struct st_fss_stat { t_fss_mod_t s_fss_st_mode; t_fss_off_t s_fss_st_size; } t_fss_stat;/* Definition of volume information structure *//*--------------------------------------------*/typedef struct st_fssVolInfo { s32 v_FreeSize; s32 v_TotalSize; s32 v_NumberOfFiles; s32 v_FreeSizeAfterDefrag; s32 v_MaxFileSizeBeforeDefrag; s32 v_MaxFileSizeAfterDefrag; u8 v_State; MC_PCC_FILL_STRUCT3 } t_fssVolInfo;/* Definition of file address structure and its pieces *//*-----------------------------------------------------*/typedef struct st_fssFilePieceInfo { ascii * p_AddrOfPiece; /* Address of the piece */ u32 v_SizeOfPiece; /* Size of the piece */ } t_fssFilePieceInfo;#define s_FileAddrHeader u32 v_NumberOfPieces /* Number of pieces in which the file is splitted */#define FSS_FILE_ADDR_HEADER_SIZE 4 /* Size in bytes of file address header */typedef struct st_fssFileAddr { s_FileAddrHeader; /* Header of file address structure */ t_fssFilePieceInfo a_FilePieceInfo[4]; /* Array containing info about pieces */ } t_fssFileAddr;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -