Add creation timestamp (birthtime) support for fuse.

This is based on similar support in MacFUSE.
This commit is contained in:
Pedro F. Giffuni 2013-07-12 17:22:59 +00:00
parent 3fddef95af
commit 944d37b123
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=253276
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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;