📄 fs44freezevol.c
字号:
#ifdef FSS_FTR#define ACCESS_RIGHTS_INTERNAL_FS#define FS44FREEZEVOL_C#undef FILE_NUMBER#define FILE_NUMBER 44 #include "Fs.h"#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 1void Fs44_01FreezeVolume( void * pp_Param ){ t_fsVolStruct * pl_Volume; t_FsCmdFreezeVol * pl_Param = (t_FsCmdFreezeVol *) pp_Param; /* Search if volume exist */ pl_Volume = MC_FS_VD_SEARCH_VOL_BY_NAME( (fsVolName *) pl_Param->p_VolName, FSS_NAME_MAX ); /* If volume do not exist return error */ if ( pl_Volume == NIL ) { /* Volume unknow -> error */ MC_FS_STATUS(pl_Param) = FS_ENXIO; return; } /* Verify if freeze counter overflows */ if ( (u8) (pl_Volume->v_FreezeCounter + 1) == 0 ) { /* Volume unknow -> error */ MC_FS_STATUS(pl_Param) = FS_ERR_FREEZE_OVF; return; } /* Updates freeze counter and freeze the volume if not already made */ if ( pl_Volume->v_FreezeCounter == 0 ) { /* Set the interlayer table pointer */ MC_FS_LL_SET_NEW_VOL( pl_Volume ); /* Call lower layers to fill structure */ MC_FS_LL_FREEZE_UNFREEZE_VOL( FS_FREEZE_VOL, &MC_FS_STATUS(pl_Param) ); } /* Increment freeze counter */ pl_Volume->v_FreezeCounter++;}#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 2u32 Fs44_02ProcessFreezeVolume(u8 vp_Behaviour, const fsVolName * pp_VolName ){ /* Reserve message space */ t_FsCmdFreezeVol * pl_FreezeVol = (t_FsCmdFreezeVol *) MC_FS_GET_MEMORY(sizeof(t_FsCmdFreezeVol)); /* Fill message with input parameters */ pl_FreezeVol->p_VolName = pp_VolName; /* Send message by setting operation and return command identifier */ return( MC_FS_MA_SEND_CMD_MSG_TO_FS( vp_Behaviour, (void*) pl_FreezeVol, FS_CMD_FREEZEVOL_REQ));}#endif /* FSS_FTR */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -