📄 mfm15mount.c
字号:
#ifdef FSS_FTR#define ACCESS_RIGHTS_INTERNAL_MFM#define MFM15MOUNT_C#include "mFm.h"#undef FILE_NUMBER#define FILE_NUMBER 15 #undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 1void * mFm15_01MountVol( void * pp_VolStruct, void * pp_LayerSpecif, void* pp_LowerLayer ){ t_fsVolStruct * pl_VolStruct = (t_fsVolStruct *) pp_VolStruct; t_mFmLayerContext * p_Context = ( t_mFmLayerContext *) MC_MFM_GET_MEMORY( sizeof( t_mFmLayerContext ));; /*------------------------------------------------------------------------------------*/ /* No specific data is to take in account so we have only to */ /* - create the function level table and fill it for this: */ /* * Fill this table with addresses of functions to call */ /* for different operations */ /* * if a function is not implemented do not update it in table */ /* * if nothing to do for a function then set function address */ /* to FS_FCT_NOTHING_TO_DO */ /* */ /* - Set the context of the layer */ /*------------------------------------------------------------------------------------*/ /* Initialize mFm context */ p_Context->p_First = NIL; /* Added a new layer to the volume by indicating the number of commands and the layers context pointer */ /*-----------------------------------------------------------------------*/ MC_FS_ADDED_LAYER_TO_VOL( pl_VolStruct, FS_LL_NUMBER_CMD, (void *) p_Context ); /* Indicate for the layer all commands implemented ( code and function address ) */ /*-------------------------------------------------------------------------------*/ MC_FS_LL_SET_CMD ( pl_VolStruct, FS_LL_OPER_FORMAT_VOL, mFm20_01FormatVol ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_CREATE_FILE, mFm25_01Create ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_GET_OBJ_INFO, mFm55_01GetObjInfo ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_REMOVE, mFm35_01Remove ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_RENAME, mFm30_01Rename ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_OPEN_DIR, mFm40_01OpenDir ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_READDIR, mFm45_01ReadDir ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_CLOSEDIR, mFm50_01CloseDir ); MC_FS_LL_SET_CMD( pl_VolStruct, FS_LL_OPER_GETFILESADDR, mFm47_01GetFilesAddr ); /* Transfer to lower layer a command for which nothing is to do for FM */ /*----------------------------------------------------------------------*/ MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_INIT, MFM_LL_OPER_INIT ); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_READ, MFM_LL_OPER_READ ); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_WRITE_COMPLEX, MFM_LL_OPER_WRITE_COMPLEX ); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_OPEN_FILE, MFM_LL_OPER_OPEN_FILE ); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_UPDATE_IOBUFF_CONF, MFM_LL_OPER_UPDATE_IOBUFF_CONF ); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_CLOSE_FILE, MFM_LL_OPER_CLOSE_FILE ); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_FFLUSH, MFM_LL_OPER_FFLUSH ); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_GET_VOL_INFO, MFM_LL_OPER_GET_VOL_INFO); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_FREEZEUNFREEZEVOL, MFM_LL_OPER_FREEZEUNFREEZEVOL); MC_FS_LL_SET_CMD_TO_LOW_LAYER_CMD( pl_VolStruct, FS_LL_OPER_GARBAGEVOL, MFM_LL_OPER_GARBAGEVOL); /* No input structure is to give to direct higher layer */ /*-----------------------------------------------------------*/ return ( 0 );}#endif /* FSS_FTR */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -