minix/servers/vfs/write.c
Ben Gras a9f55a2e46 VFS, FSes: add REQ_PEEK request type
REQ_PEEK behaves just like REQ_READ except that it does not copy
data anywhere, just obtains the blocks from the FS into the cache.

To be used by the future mmap implementation.

Change-Id: I1b56de304f0a7152b69a72c8962d04258adb44f9
2013-03-07 10:57:38 +00:00

22 lines
660 B
C

/* This file is the counterpart of "read.c". It contains the code for writing
* insofar as this is not contained in read_write().
*
* The entry points into this file are
* do_write: call read_write to perform the WRITE system call
*/
#include "fs.h"
#include "file.h"
#include "param.h"
/*===========================================================================*
* do_write *
*===========================================================================*/
int do_write()
{
/* Perform the write(fd, buffer, nbytes) system call. */
return(do_read_write_peek(WRITING, job_m_in.fd,
job_m_in.buffer, (size_t) job_m_in.nbytes));
}