Module Name: src Committed By: njoly Date: Mon Jul 29 11:40:04 UTC 2013
Modified Files: src/lib/libc/sys: symlink.2 Log Message: Add symlinkat(2) specific errors. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/symlink.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/sys/symlink.2 diff -u src/lib/libc/sys/symlink.2:1.25 src/lib/libc/sys/symlink.2:1.26 --- src/lib/libc/sys/symlink.2:1.25 Sun Jan 13 08:15:02 2013 +++ src/lib/libc/sys/symlink.2 Mon Jul 29 11:40:04 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: symlink.2,v 1.25 2013/01/13 08:15:02 dholland Exp $ +.\" $NetBSD: symlink.2,v 1.26 2013/07/29 11:40:04 njoly Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)symlink.2 8.1 (Berkeley) 6/4/93 .\" -.Dd November 18, 2012 +.Dd July 29, 2013 .Dt SYMLINK 2 .Os .Sh NAME @@ -84,12 +84,12 @@ can be set to .Dv AT_FDCWD in order to specify the current directory. .Sh RETURN VALUES -Upon successful completion, a zero value is returned. -If an error occurs, the error code is stored in -.Va errno -and a \-1 value is returned. +.Rv -std symlink symlinkat .Sh ERRORS -The symbolic link succeeds unless: +.Fn symlink +and +.Fn symlinkat +will fail and no link will be created if: .Bl -tag -width Er .It Bq Er EACCES A component of the @@ -151,6 +151,24 @@ The file .Fa name2 would reside on a read-only file system. .El +.Pp +In addition, +.Fn symlinkat +will fail if: +.Bl -tag -width Er +.It Bq Er EBADF +.Fa name2 +does not specify an absolute path and +.Fa fd +is neither +.Dv AT_FDCWD +nor a valid file descriptor open for reading or searching. +.It Bq Er ENOTDIR +.Fa name2 +is not an absolute path and +.Fa fd +is a file descriptor associated with a non-directory file. +.El .Sh SEE ALSO .Xr ln 1 , .Xr link 2 ,