]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: simplify linkat with AT_EMPTY_PATH
authorKen Brown <kbrown@cornell.edu>
Thu, 25 Feb 2021 12:54:10 +0000 (07:54 -0500)
committerKen Brown <kbrown@cornell.edu>
Thu, 25 Feb 2021 22:44:18 +0000 (17:44 -0500)
commit182ba1f022fb42b22fd2c7d925bf687227b2b3c7
treee814587d0460934e55a46e42b2d4930b75b96005
parent425203384a6c3e19af782c86570740464423eb4d
Cygwin: simplify linkat with AT_EMPTY_PATH

linkat(olddirfd, oldpath, oldname, newdirfd, newname, AT_EMPTY_PATH)
is supposed to create a link to the file referenced by olddirfd if
oldname is the empty string.  Currently this is done via the /proc
filesystem by converting the call to

  linkat(AT_FDCWD, "/proc/self/fd/<olddirfd>", newdirfd, newname,
         AT_SYMLINK_FOLLOW),

which ultimately leads to a call to the appropriate fhandler's link
method.  Simplify this by using cygheap_fdget to obtain the fhandler
directly.
winsup/cygwin/syscalls.cc
This page took 0.029101 seconds and 5 git commands to generate.