minix/servers/vfs/write.c
David van Moolenbroek 2c8310fce6 VFS: store m_out as part of worker thread state
There is no need to pass pointers around when there is a structure
available that already stores other similar state, such as m_in.

Change-Id: I3164c5c55c71f443688103d1f0756c086eb05974
2014-03-01 09:05:00 +01:00

22 lines
664 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(void)
{
/* 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));
}