date and time created 91/03/06 18:09:53 by bostic
[unix-history] / usr / src / lib / libc / sys / rename.2
index 8c83abb..ecf9d75 100644 (file)
@@ -1,8 +1,9 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1983 The Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)rename.2    6.2 (Berkeley) %G%
+.\" %sccs.include.redist.man%
+.\"
+.\"    @(#)rename.2    6.6 (Berkeley) %G%
 .\"
 .TH RENAME 2 ""
 .UC 5
 .\"
 .TH RENAME 2 ""
 .UC 5
@@ -36,6 +37,12 @@ guarantees that an instance of
 .I to
 will always exist, even if the system should crash in
 the middle of the operation.
 .I to
 will always exist, even if the system should crash in
 the middle of the operation.
+.PP
+If the final component of
+.I from
+is a symbolic link,
+the symbolic link is renamed,
+not the file or directory to which it points.
 .SH CAVEAT
 The system can deadlock if a loop in the file system graph is present.
 This loop takes the form of an entry in directory \*(lqa\*(rq,
 .SH CAVEAT
 The system can deadlock if a loop in the file system graph is present.
 This loop takes the form of an entry in directory \*(lqa\*(rq,
@@ -79,6 +86,17 @@ A component of either path prefix denies search permission.
 The requested link requires writing in a directory with a mode
 that denies write permission.
 .TP 15
 The requested link requires writing in a directory with a mode
 that denies write permission.
 .TP 15
+[EPERM]
+The directory containing \fIfrom\fP is marked sticky,
+and neither the containing directory nor \fIfrom\fP
+are owned by the effective user ID.
+.TP 15
+[EPERM]
+The \fIto\fP file exists,
+the directory containing \fIto\fP is marked sticky,
+and neither the containing directory nor \fIto\fP
+are owned by the effective user ID.
+.TP 15
 [ELOOP]
 Too many symbolic links were encountered in translating either pathname.
 .TP 15
 [ELOOP]
 Too many symbolic links were encountered in translating either pathname.
 .TP 15
@@ -99,6 +117,17 @@ are on different logical devices (file systems).  Note that this error
 code will not be returned if the implementation permits cross-device
 links.
 .TP 15
 code will not be returned if the implementation permits cross-device
 links.
 .TP 15
+[ENOSPC]
+The directory in which the entry for the new name is being placed
+cannot be extended because there is no space left on the file
+system containing the directory.
+.TP 15
+[EDQUOT]
+The directory in which the entry for the new name
+is being placed cannot be extended because the
+user's quota of disk blocks on the file system
+containing the directory has been exhausted.
+.TP 15
 [EIO]
 An I/O error occurred while making or updating a directory entry.
 .TP 15
 [EIO]
 An I/O error occurred while making or updating a directory entry.
 .TP 15