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.

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

link_f Creates a hard link between two files on the same volume.<br />

unsigned long link_f(<br />

char *name1, /* an existing filename */<br />

char *name2 /* a new directory entry to be created */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

NFS formatted volumes.<br />

link_f() makes a hard link from name2 to name1. This increments the link count<br />

for the file (see stat_f()). After this call, name1 and name2 are two alternate<br />

names for the same file. Both files must be on the same volume.<br />

name1 Points to a null-terminated pathname of an existing file. Must not<br />

refer to a directory.<br />

name2 Points to a null-terminated pathname of a directory entry to be<br />

created.<br />

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

Hex Mnemonic Description<br />

0x2001 E_FUNC pHILE+ volume; illegal operation.<br />

0x200C E_IFN Illegal pathname.<br />

0x200D E_NDD No default directory.<br />

0x2015 E_RO Requested operation not allowed on this<br />

file.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 2-53<br />

2

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

Saved successfully!

Ooh no, something went wrong!