Home | History | Annotate | Download | only in sys
History log of /src/lib/libc/sys/rename.2
RevisionDateAuthorComments
 1.34  14-Feb-2025  dholland rename.2: clarify behavior of overlapping renames

It came up today that on case-insensitive filesystems, rename("FOO",
"foo") unlinks the file. That's obviously not what we want, so it's a
bug. In the course of the ensuing discussion it developed that the
description in the man page was at least vague and possibly vaguely
wrong. This commit fixes that.

Bump date.
 1.33  27-Jan-2015  wiz branches: 1.33.28;
Remove superfluous comma.
 1.32  28-Jul-2013  njoly Add renameat(2) specific errors.
 1.31  28-Jul-2013  wiz Fix punctuation formatting and sort errors.
 1.30  28-Jul-2013  njoly Adjust EFAULT error description to use arguments name from synopsis.
 1.29  30-Jun-2013  wiz Fix second problem noted by Henning Petersen in PR 47975:
renameat is in unistd.h. Bump date.
 1.28  30-Jun-2013  wiz Fix typo in SYNOPSIS. From Henning Petersen in PR 47975.
 1.27  13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.26  01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.25  01-Dec-2012  wiz Remove trailing whitespace.
 1.24  18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.23  31-May-2010  njoly branches: 1.23.6; 1.23.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.22  27-Dec-2005  chs change errors returned for various operations on "/" to conform to SUSv3.
as discussed on tech-kern some time back.
 1.21  13-May-2004  wiz \- is a minus, not -.
 1.20  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19  16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17  01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.16  08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15  16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14  16-Sep-2001  wiz Boring whitespace fixes.
 1.13  17-May-2001  matt replace return with rename (from Bruce Korb).
 1.12  17-Jun-2000  hubertf branches: 1.12.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.11  02-Dec-1999  kleink branches: 1.11.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10  22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9  29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.8  24-May-1998  kleink Add a comment about the deviation from POSIX and how to use the compatibility
interface.
 1.7  27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6  22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5  19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4  29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3  25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2  01-Aug-1993  mycroft Add RCS indentifiers.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  27-Feb-1995  cgd from Lite
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.6.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.2.1  23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.12.4.4  18-Oct-2002  nathanw Catch up to -current.
 1.12.4.3  22-Mar-2002  nathanw Catch up to -current.
 1.12.4.2  08-Mar-2002  nathanw Catch up to -current.
 1.12.4.1  08-Oct-2001  nathanw Catch up to -current.
 1.23.12.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.12.2  25-Feb-2013  tls resync with head
 1.23.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.6.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.6.2  23-Jan-2013  yamt sync with head
 1.23.6.1  16-Jan-2013  yamt sync with (a bit old) head
 1.33.28.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed