diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-11 06:41:31 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-13 11:31:46 +0200 |
commit | 79c92dbd7028a9782b85fcbbbe123e1c44cbaec1 (patch) | |
tree | 9c87d3495efdbf9c407f6519659b23644ea48724 /coreutils/md5_sha1_sum.c | |
parent | 1a181264d51bc3f3a3c66f756da84ab61b6823d4 (diff) |
touch: switch to using utimensat() and futimens()
This patch changes the functions used to update timestamps in touch.
Before, utimes() and lutimes() were used, which had certain
disadvantages.
They are unable to handle nanosecond timestamps, and implementations of
certain features like -a and -m require running stat() in a loop.
Almost all implementations of utimes() and lutimes() are wrappers for
utimensat(), this is the case for glibc, ulibc and musl libc.
function old new delta
__futimens_time64 - 24 +24
__lutimes_time64 80 - -80
touch_main 539 456 -83
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 0/1 up/down: 24/-163) Total: -139 bytes
Signed-off-by: urmum-69 <urmum69@snopyta.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/md5_sha1_sum.c')
0 files changed, 0 insertions, 0 deletions