FAT | RFS | XFS | ZFS
setvbuf()
PROTOTYPE
#include <stdio.h>
int setvbuf(FILE *file, char *buf, int mode, size_t size);
DESCRIPTION
setvbuf() is used in some environments to control how a stream is buffered. buf points to a user-allocated buffer. size is the size of this buffer. mode is one of:
_IOFBF - for fully buffered I/O _IOLBF - for line buffered I/O _IONBF - for unbuffered I/O
For Blunk’s file systems, the buffer size is set at compile time, so setvbuf() has no effect.
If successful, setvbuf() returns 0. Otherwise, it sets errno and returns a non-zero value.
ERROR CODES
| EBADF | file is not the handle of an open file. |
| EFAULT | buf equals NULL. |
| EINVAL | mode is invalid or the request cannot be honored. |
| EISDIR | file refers to a directory. |