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

Go to the source code of this file.

Functions

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

Function Documentation

◆ ttywrite()

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

Definition at line 9 of file ttywrite.c.

References OK, SYSERR, and ttyputc().

14 {
15  /* Handle negative and zero counts */
16 
17  if (count < 0) {
18  return SYSERR;
19  } else if (count == 0){
20  return OK;
21  }
22 
23  /* Write count characters one at a time */
24 
25  for (; count>0 ; count--) {
26  ttyputc(devptr, *buff++);
27  }
28  return OK;
29 }
#define SYSERR
処理が失敗した場合
Definition: kernel.h:79
#define OK
処理が成功した場合
Definition: kernel.h:77
devcall ttyputc(struct dentry *, char)
Definition: ttyputc.c:9
Here is the call graph for this function: