XINU
Functions
lflwrite.c File Reference
#include <xinu.h>
Include dependency graph for lflwrite.c:

Go to the source code of this file.

Functions

devcall lflwrite (struct dentry *devptr, char *buff, int32 count)
 

Function Documentation

◆ lflwrite()

devcall lflwrite ( struct dentry devptr,
char *  buff,
int32  count 
)

Definition at line 9 of file lflwrite.c.

References lflputc(), and SYSERR.

14 {
15  int32 i; /* Number of bytes written */
16 
17  if (count < 0) {
18  return SYSERR;
19  }
20 
21  /* Iteratate and write one byte at a time */
22 
23  for (i=0; i<count; i++) {
24  if (lflputc(devptr, *buff++) == SYSERR) {
25  return SYSERR;
26  }
27  }
28  return count;
29 }
#define SYSERR
処理が失敗した場合
Definition: kernel.h:79
devcall lflputc(struct dentry *, char)
Definition: lflputc.c:9
int int32
符号あり32ビット整数(int)
Definition: kernel.h:11
Here is the call graph for this function: