fsconnect.c

来自「T-kernel 的extension源代码」· C语言 代码 · 共 64 行

C
64
字号
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	fsconnect.c (seio) * *	Standard input/output *	File system extension setting */#include "sfmgr.h"#include "fsinfo.h"typedef ER (*ATTACH_FP)(FS *);IMPORT FS_ENT fs_def_tbl[];/* * Connect a file system that corresponds to mode */EXPORT ERcall_attach(INT mode, FS *fs){	FS_ENT		*entp;	ATTACH_FP	attach;	for (entp = fs_def_tbl; entp->attach != NULL; ++entp) {		if (entp->mode == (mode & SF_TYPE_MASK)) {			attach = (ATTACH_FP)entp->attach;			return attach(fs);		}	}	return E_PAR;}/* * Return the size of file system connection information */EXPORT ERget_fssize(INT mode){	FS_ENT	*entp;	for (entp = fs_def_tbl; entp->attach != NULL; ++entp) {		if (entp->mode == (mode & SF_TYPE_MASK)) { 			return entp->fssize;		}	}	return E_PAR;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?