06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

write_f pHILE+ <strong>System</strong> <strong>Calls</strong><br />

write_f Writes to an open file.<br />

#include <br />

unsigned long write_f(<br />

unsigned long fid, /* file identifier */<br />

void *buffer, /* output buffer */<br />

unsigned long bcount /* output byte count */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

Return Value<br />

All volume types except CD-ROM.<br />

write_f() writes data into a file. It begins at the current position of the<br />

connection's L_ptr.<br />

After write_f(), the file's L_ptr is updated to point to the byte after the last byte<br />

written.<br />

This call overwrites the original content of the file. If necessary, write_f() expands<br />

the file by allocating space to hold the written data.<br />

fid Specifies the file identifier associated with the file.<br />

buffer Points to the data to write.<br />

bcount Specifies the number of bytes to write.<br />

This system call returns 0 on success or an error code on failure.<br />

2-142 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!