On Thu Apr 8, 2021 at 11:27 AM BST, Xabier Oneca -- xOneca wrote: > Hi Peter, > > So quick for the patch! Nice! :) > > > This patch adds a config option which makes touch set timestamps to the > > current microsecond, instead of the current second. > > > > Signed-off-by: Peter D <[email protected]> > > --- > > This patch should be applied on top of Xabier Oneca's patches to add the > > -a and -m options to busybox > > > > coreutils/touch.c | 22 ++++++++++++++++++---- > > 1 file changed, 18 insertions(+), 4 deletions(-) > > > > diff --git a/coreutils/touch.c b/coreutils/touch.c > > index e80720982..ac9e233ad 100644 > > --- a/coreutils/touch.c > > +++ b/coreutils/touch.c > > @@ -33,6 +33,13 @@ > > //config: depends on TOUCH > > //config: help > > //config: Enable touch to use a reference file or a given date/time > > argument. > > +//config: > > +//config:config FEATURE_TOUCH_MICROSECONDS > > +//config: bool "Add support for setting microsecond timestamps" > > +//config: default y > > I would make it default 'y' to preserve filesystem timestamps when > using -a/-m, but maybe it is not so important the sub-second precision > in touch..? Looking at Rasmus's feedback, I probably think it would be best to simply switch to using utimensat(), and have nanosecond precision. I just wasn't sure at the time if it was a good idea to switch from using utimes/lutimes. > Hey! Not so fast! You forgot the curly brackets! ;) Well, that's embarassing. I really should have checked twice, thanks for pointing it out.
Peter D. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
