2006-10-25 15:40:36 +02:00
|
|
|
/* 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"
|
2013-11-04 22:48:08 +01:00
|
|
|
#include <minix/callnr.h>
|
2006-10-25 15:40:36 +02:00
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* do_write *
|
|
|
|
*===========================================================================*/
|
2013-10-29 23:15:15 +01:00
|
|
|
int do_write(void)
|
2006-10-25 15:40:36 +02:00
|
|
|
{
|
|
|
|
/* Perform the write(fd, buffer, nbytes) system call. */
|
2014-05-12 18:17:10 +02:00
|
|
|
return(do_read_write_peek(WRITING, job_m_in.m_lc_vfs_readwrite.fd,
|
|
|
|
job_m_in.m_lc_vfs_readwrite.buf, job_m_in.m_lc_vfs_readwrite.len));
|
2006-10-25 15:40:36 +02:00
|
|
|
}
|