aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/fuse
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2013-07-12 17:22:59 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2013-07-12 17:22:59 +0000
commit944d37b123fc4d85f41e0f1e48d0a5f93bed4b4d (patch)
treed4fd12168c58c7eaa3c2b49932631ed74942cc3a /sys/fs/fuse
parent3fddef95af35202b43175fe6bb92f8be98dc7cee (diff)
downloadsrc-944d37b123fc4d85f41e0f1e48d0a5f93bed4b4d.tar.gz
src-944d37b123fc4d85f41e0f1e48d0a5f93bed4b4d.zip
Add creation timestamp (birthtime) support for fuse.
This is based on similar support in MacFUSE.
Notes
Notes: svn path=/head/; revision=253276
Diffstat (limited to 'sys/fs/fuse')
-rw-r--r--sys/fs/fuse/fuse_internal.h2
-rw-r--r--sys/fs/fuse/fuse_kernel.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/fs/fuse/fuse_internal.h b/sys/fs/fuse/fuse_internal.h
index 187245cbd907..d29fd3068d30 100644
--- a/sys/fs/fuse/fuse_internal.h
+++ b/sys/fs/fuse/fuse_internal.h
@@ -223,6 +223,8 @@ fuse_internal_attr_fat2vat(struct mount *mp,
vap->va_mtime.tv_nsec = fat->mtimensec;
vap->va_ctime.tv_sec = fat->ctime;
vap->va_ctime.tv_nsec = fat->ctimensec;
+ vap->va_birthtime.tv_sec = fat->crtime;
+ vap->va_birthtime.tv_nsec = fat->crtimensec;
vap->va_blocksize = PAGE_SIZE;
vap->va_type = IFTOVT(fat->mode);
diff --git a/sys/fs/fuse/fuse_kernel.h b/sys/fs/fuse/fuse_kernel.h
index 07cd4a999588..b76a5a7befe8 100644
--- a/sys/fs/fuse/fuse_kernel.h
+++ b/sys/fs/fuse/fuse_kernel.h
@@ -69,9 +69,15 @@ struct fuse_attr {
__u64 atime;
__u64 mtime;
__u64 ctime;
+#ifdef __FreeBSD__
+ __u64 crtime;
+#endif
__u32 atimensec;
__u32 mtimensec;
__u32 ctimensec;
+#ifdef __FreeBSD__
+ __u32 crtimensec;
+#endif
__u32 mode;
__u32 nlink;
__u32 uid;