You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
696 B

/* lflwrite.c - lflwrite */
#include <xinu.h>
/*------------------------------------------------------------------------
* lflwrite -- Write data to a previously opened local disk file
*------------------------------------------------------------------------
*/
devcall lflwrite (
struct dentry *devptr, /* Entry in device switch table */
char *buff, /* Buffer holding data to write */
int32 count /* Number of bytes to write */
)
{
int32 i; /* Number of bytes written */
if (count < 0) {
return SYSERR;
}
/* Iteratate and write one byte at a time */
for (i=0; i<count; i++) {
if (lflputc(devptr, *buff++) == SYSERR) {
return SYSERR;
}
}
return count;
}