Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/modules/klibc/fwrite.c

Source at commit 1406 created 12 years 10 months ago.
By meklort, Revert drivers.c so that kexts are only loaded when OSBundleRequired is set and that value is not safe mode. Added some comments about it too.
1/*
2 * fwrite.c
3 */
4
5#include <unistd.h>
6#include <stdio.h>
7
8size_t _fwrite(const void *buf, size_t count, FILE *f)
9{
10size_t bytes = 0;
11ssize_t rv;
12const char *p = buf;
13
14while (count) {
15rv = 1;
16// TODO: use FILE*
17 putchar(*p);
18
19p += rv;
20bytes += rv;
21count -= rv;
22}
23
24return bytes;
25}
26

Archive Download this file

Revision: 1406