1433d6423SLionel Sambuc #include <sys/cdefs.h> 2433d6423SLionel Sambuc #include <lib.h> 3433d6423SLionel Sambuc #include "namespace.h" 4433d6423SLionel Sambuc 5433d6423SLionel Sambuc #include <string.h> 6433d6423SLionel Sambuc #include <unistd.h> 7433d6423SLionel Sambuc write(int fd,const void * buffer,size_t nbytes)8433d6423SLionel Sambucssize_t write(int fd, const void *buffer, size_t nbytes) 9433d6423SLionel Sambuc { 10433d6423SLionel Sambuc message m; 11433d6423SLionel Sambuc 12433d6423SLionel Sambuc memset(&m, 0, sizeof(m)); 13433d6423SLionel Sambuc m.m_lc_vfs_readwrite.fd = fd; 14433d6423SLionel Sambuc m.m_lc_vfs_readwrite.len = nbytes; 15433d6423SLionel Sambuc m.m_lc_vfs_readwrite.buf = (vir_bytes)buffer; 16*232819ddSDavid van Moolenbroek m.m_lc_vfs_readwrite.cum_io = 0; /* reserved for future use */ 17433d6423SLionel Sambuc return(_syscall(VFS_PROC_NR, VFS_WRITE, &m)); 18433d6423SLionel Sambuc } 19433d6423SLionel Sambuc 20