Re: [PATCH v2 3/3] touch: add --time=what option

2021-04-12 Thread Bernhard Reutner-Fischer
On Tue, 13 Apr 2021 00:27:50 +0200 Xabier Oneca -- xOneca wrote: > This option is the long version of -a and -m. > > function old new delta > touch_main 484 539 +55 > .rodata

[PATCH v2 3/3] touch: add --time=what option

2021-04-12 Thread Xabier Oneca -- xOneca
This option is the long version of -a and -m. function old new delta touch_main 484 539 +55 .rodata 103649 103680 +31 static.touch_longopts

Re: [PATCH 3/3] touch: add --time=what option

2021-04-12 Thread Xabier Oneca -- xOneca
Hi all, > This option is the long version of -a and -m. > > function old new delta > touch_main 484 553 +69 > .rodata 103649 103681 +32 >

Re: [PATCH 1/3] touch: implement nanosecond precision times

2021-04-12 Thread Xabier Oneca -- xOneca
Hi Peter, > Using utimensat(2) allows us to set times in nanosecond precision. Also logic > is > simplified and code shrinked. > > function old new delta > touch_main 513 479 -34 >

[PATCH 3/3] touch: add --time=what option

2021-04-12 Thread Xabier Oneca -- xOneca
This option is the long version of -a and -m. function old new delta touch_main 484 553 +69 .rodata 103649 103681 +32 static.touch_longopts

[PATCH 1/3] touch: implement nanosecond precision times

2021-04-12 Thread Xabier Oneca -- xOneca
Using utimensat(2) allows us to set times in nanosecond precision. Also logic is simplified and code shrinked. function old new delta touch_main 513 479 -34

[PATCH 2/3] touch: prevent usage of -r and -t at once

2021-04-12 Thread Xabier Oneca -- xOneca
coreutils forbids this combination. Signed-off-by: Xabier Oneca --- coreutils/touch.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/coreutils/touch.c b/coreutils/touch.c index a00ee0ba4..6a4ffb400 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c

Re: [PATCH v2 3/3] touch: remove unneeded GETOPT32 defines

2021-04-12 Thread Denys Vlasenko
Applied all 3 patches. Thank you. On Sat, Apr 10, 2021 at 12:44 AM Xabier Oneca -- xOneca wrote: > > > Long options handling (getopt32 vs getopt32long) is done in libb.h, no need > > to > > care here of the same logic. This cleans the code a bit. > > > > Also, --no-create was grouped as a SUSv3

Re: [PATCH v2] touch: switch to using utimensat() and futimens()

2021-04-12 Thread Rasmus Villemoes
On 11/04/2021 07.41, urmum-69 wrote: > 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