Paul Eggert
bedd9bb652
mv: fewer syscalls for ‘mv a b’
...
This builds on a previous patch for mv atomicity (Bug#29961).
It merely improves performance; it does not fix bugs.
* src/copy.h (struct cp_options): New members last_file, rename_errno.
* src/copy.c (copy_internal): Support new rename_errno member
for the copy options. Avoid calling stat when new members
suggest it’s not needed.
(cp_options_default): Initialize new members.
* src/mv.c: Include renameat2.h.
(main): With two arguments, first call ‘renamat2 (AT_FDCWD, "a",
AT_FDCWD, "b", RENAME_NOREPLACE)’. Use its results to skip
remaining processing if possible; for example, if it succeeds
there is no need to stat either "a" or "b". Also, set
x.last_file when it is the last file to rename.
2018-01-10 00:51:54 -08:00
..
2017-09-19 01:22:54 -07:00
2016-11-22 20:04:24 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-10 00:51:54 -08:00
2018-01-10 00:51:54 -08:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-05 22:57:21 -08:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2017-02-12 18:05:37 -08:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-10 00:51:54 -08:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-03 11:04:03 -08:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00
2018-01-01 15:57:22 +00:00