📄 open.c
字号:
/* *---------------------------------------------------------------------- * 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. * *---------------------------------------------------------------------- *//* * @(#)open.c (seio) * */#include <basic.h>#include <extension/seio.h>#include <extension/errno.h>#include <errno.h>#include <stdarg.h>#include <seio/fcntl.h>#include "sfimport.h"EXPORT int open( const char *path, int oflag, ... ){ va_list ap; W mode; ER err; va_start(ap, oflag); mode = ( (oflag & O_CREAT) != 0 )? va_arg(ap, int): 0; va_end(ap); err = tkse_open(path, oflag, mode); if ( err < E_OK ) { errno = toSFERRNO(err); return -1; } return err;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -