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.

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

read_link <strong>Read</strong>s the value of a symbolic link.<br />

unsigned long read_link(<br />

char *name, /* a file containing the symbolic link */<br />

char *buf, /* user buffer to hold the returned contents */<br />

unsigned long *bufsize /* maximum buffer size */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

Return Value<br />

NFS volumes.<br />

read_link() reads the contents of the symbolic link of a file. The returned data is<br />

not null-terminated.<br />

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

containing the symbolic link.<br />

buf Points to the memory area that receives the data.<br />

bufsize Points to the maximum buffer size before the call, and the<br />

length of the data returned in buf after the call.<br />

If successful, read_link stores in *bufsize the length of the data stored in buf. If<br />

this is the same as the maximum buffer size, only part of the data may have been<br />

returned.<br />

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

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