XINU
device
rfs
rflgetc.c
Go to the documentation of this file.
1
/* rflgetc.c - rflgetc */
2
3
#include <
xinu.h
>
4
5
/*------------------------------------------------------------------------
6
* rflgetc - Read one character from a remote file
7
*------------------------------------------------------------------------
8
*/
9
devcall
rflgetc
(
10
struct
dentry
*devptr
/* Entry in device switch table */
11
)
12
{
13
char
ch;
/* Character to read */
14
int32
retval;
/* Return value */
15
16
retval =
rflread
(devptr, &ch, 1);
17
18
if
(retval != 1) {
19
return
SYSERR
;
20
}
21
22
return
(
devcall
)ch;
23
}
xinu.h
全てのシステムヘッダファイルをインクルードする。
SYSERR
#define SYSERR
処理が失敗した場合
Definition:
kernel.h:79
dentry
Definition:
conf.h:6
rflgetc
devcall rflgetc(struct dentry *devptr)
Definition:
rflgetc.c:9
rflread
devcall rflread(struct dentry *, char *, int32)
Definition:
rflread.c:9
int32
int int32
符号あり32ビット整数(int)
Definition:
kernel.h:11
devcall
int32 devcall
デバイスコール関数 返り値の型
Definition:
kernel.h:49
Generated by
1.8.13