06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

open_f Opens a file.<br />

#include <br />

unsigned long open_f(<br />

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

char *name, /* pathname */<br />

unsigned long mode /* unused; set to zero */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

Return Value<br />

All volume types.<br />

open_f() creates a connection between a file and the calling task and returns a file<br />

identifier. The file identifier is used in subsequent operations on the file. open_f()<br />

fails if the system is out of file control blocks or if the task is out of open file table<br />

entries.<br />

open_f() does not check for a file type. It opens ordinary files, directory files, or<br />

system files. However, directory files and system files are read-only.<br />

open_f() always positions the L_ptr at the first byte in the file.<br />

For CD-ROM volumes, open_f() can be used to read the primary volume descriptor.<br />

See “Primary Volume Descriptor,” under “Notes.”<br />

fid Points to the variable where open_f() stores the file identifier.<br />

name Points to the null-terminated pathname of the file to open.<br />

mode Reserved for future use; should be set to 0 for future<br />

compatibility.<br />

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

2-78 <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!