|
|
1.1 ! root 1: /* lfwrite.c - lfwrite */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: ! 6: /*------------------------------------------------------------------------ ! 7: * lfwrite -- write 'count' bytes onto a local disk file ! 8: *------------------------------------------------------------------------ ! 9: */ ! 10: lfwrite(devptr, buff, count) ! 11: struct devsw *devptr; ! 12: char *buff; ! 13: int count; ! 14: { ! 15: int i; ! 16: ! 17: if (count < 0) ! 18: return(SYSERR); ! 19: for (i=count; i>0 ; i--) ! 20: if (lfputc(devptr, *buff++) == SYSERR) ! 21: return(SYSERR); ! 22: return(count); ! 23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.