library/src/filesystem/BP-Filesystem.cc
// This uses the fsync() routine to flush all pipe data through the
// fd and onto the disk.
This uses the fsync() routine to flush all pipe data through the
fd and onto the disk.
This uses the fsync () routine to flush all pipe data through the fd and onto the disk .
int BP_FDFlush(int fd)
{
	switch(fsync(fd))
	{
		case EBADF:
			return ERR_FAILURE;
		case EIO:
			return ERR_FAILURE;
		case EROFS:
			return ERR_FAILURE;
		case EINVAL:
			return ERR_FAILURE;
	}
	return ERR_SUCCESS;
}
int BP_FDFlush ( int fd ) { switch ( fsync ( fd ) ) { case EBADF : return ERR_FAILURE ; case EIO : return ERR_FAILURE ; case EROFS : return ERR_FAILURE ; case EINVAL : return ERR_FAILURE ; } return ERR_SUCCESS ; }
This uses the fsync() routine to flush all pipe data through the
fd and onto the disk.
This uses the fsync () routine to flush all pipe data through the fd and onto the disk .
// fsync the file descriptor // return indicating success