Adam tevko wrote:
Hi,
[...]
By the way, I sent several patches to libfuse to Adam
last may. Did you take them into account ?
Patches have been delivered since May:
https://github.com/OpenIndiana/oi-userland/tree/oi/hipster/components/library/libfuse/patches
Though, I have to go through our communication and check if thats all. I
recall I havent applied everything.
I do not see the one I sent you on May 5th about permissions
to set timestamps on files, and I do not remember anybody
having objections about it (this has been in fuse-lite and
used by ntfs-3g for years).
I attach it again, just in case.
Jean-Pierre
Adam
_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev
--- fuse.c.ref 2016-05-05 11:24:20.432471400 +0200
+++ fuse.c 2016-05-05 11:26:24.508680800 +0200
@@ -1462,6 +1462,29 @@
else
err = fuse_fs_truncate(f->fs, path, attr->st_size);
}
+#ifdef HAVE_UTIMENSAT
+ if (!err &&
+ (valid & (FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME))) {
+ struct timespec tv[2];
+
+ tv[0].tv_sec = 0;
+ tv[1].tv_sec = 0;
+ tv[0].tv_nsec = UTIME_OMIT;
+ tv[1].tv_nsec = UTIME_OMIT;
+
+ if (valid & FUSE_SET_ATTR_ATIME_NOW)
+ tv[0].tv_nsec = UTIME_NOW;
+ else if (valid & FUSE_SET_ATTR_ATIME)
+ tv[0] = attr->st_atim;
+
+ if (valid & FUSE_SET_ATTR_MTIME_NOW)
+ tv[1].tv_nsec = UTIME_NOW;
+ else if (valid & FUSE_SET_ATTR_MTIME)
+ tv[1] = attr->st_mtim;
+
+ err = fuse_fs_utimens(f->fs, path, tv);
+ } else
+#endif
if (!err && (valid & (FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME)) ==
(FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME)) {
struct timespec tv[2];
_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev