aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/freebsd32
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-02-20 16:58:19 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-02-20 16:58:19 +0000
commit0573d0a9b8ec478348cbf2a7ec370c875eb57dff (patch)
tree11b7e9f241b8fd9cad66b1f30bce46c6083e161c /sys/compat/freebsd32
parent43623d0ce7ac4cbe47b94c69077ce5b268fb05cf (diff)
vfs: add realpathat syscall
realpath(3) is used a lot e.g., by clang and is a major source of getcwd and fstatat calls. This can be done more efficiently in the kernel. This works by performing a regular lookup while saving the name and found parent directory. If the terminal vnode is a directory we can resolve it using usual means. Otherwise we can use the name saved by lookup and resolve the parent. See the review for sample syscall counts. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23574
Notes
Notes: svn path=/head/; revision=358172
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r--sys/compat/freebsd32/syscalls.master2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index a82d75d26e22..049e0b78500c 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -1160,5 +1160,7 @@
572 AUE_SHMRENAME NOPROTO { int shm_rename(const char *path_from, \
const char *path_to, int flags); }
573 AUE_NULL NOPROTO { int sigfastblock(int cmd, uint32_t *ptr); }
+574 AUE_REALPATHAT NOPROTO { int __realpathat(int fd, const char *path, \
+ char *buf, size_t size, int flags); }
; vim: syntax=off