symlink.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <html>
  2. <head>
  3. <title>symlink</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>symlink</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. symlink - create symbolic link
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;unistd.h&gt;<br>
  13. <br>
  14. int<br>
  15. symlink(const char *<em>oldname</em>, const char *<em>linkname</em>);
  16. <h3>Description</h3>
  17. symlink creates a symbolic link. The symlink itself is named
  18. <em>linkname</em>, and it points to <em>oldname</em>.
  19. <p>
  20. <em>oldname</em> need not exist or be on the same filesystem.
  21. <h3>Return Values</h3>
  22. On success, symlink returns 0. On error, -1 is returned, and
  23. <A HREF=errno.html>errno</A> is set according to the error
  24. encountered.
  25. <h3>Errors</h3>
  26. The following error codes should be returned under the conditions
  27. given. Other error codes may be returned for other errors not
  28. mentioned here.
  29. <blockquote><table width=90%>
  30. <td width=10%>&nbsp;</td><td>&nbsp;</td></tr>
  31. <tr><td>ENODEV</td> <td>The device prefix of <em>filename</em> did
  32. not exist.</td></tr>
  33. <tr><td>ENOTDIR</td> <td>A non-final component of <em>linkname</em>
  34. was not a directory.</td></tr>
  35. <tr><td>ENOENT</td> <td>A non-final component of <em>linkname</em>
  36. did not exist.</td></tr>
  37. <tr><td>EEXIST</td> <td><em>linkname</em> already exists.</td></tr>
  38. <tr><td>ENOSPC</td> <td>The filesystem that was to hold the link
  39. is full.</td></tr>
  40. <tr><td>EIO</td> <td>A hard I/O error occurred.</td></tr>
  41. <tr><td>EFAULT</td> <td><em>linkname</em> or <em>oldname</em> was
  42. an invalid pointer.</td></tr>
  43. </table></blockquote>
  44. </body>
  45. </html>