summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2019-06-25 14:24:17 +0200
committerJeremy Allison <jra@samba.org>2019-07-01 21:43:23 +0000
commit295d3501d719ffad1fd0349707ef10fd60f72b84 (patch)
tree620cbd37a865d2b5d6b302e4da27dce9f2781eee /source3
parent506ef2761c29f40720104ed4e3f9d9ba37a22f9d (diff)
downloadsamba-295d3501d719ffad1fd0349707ef10fd60f72b84.tar.gz
s3/lib: add update_stat_ex_file_id()
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/system.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 84d19e4277d..8b387f7c563 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -222,6 +222,7 @@ int sys_fcntl_long(int fd, int cmd, long arg);
void update_stat_ex_mtime(struct stat_ex *dst, struct timespec write_ts);
void update_stat_ex_itime(struct stat_ex *dst, struct timespec itime);
void update_stat_ex_create_time(struct stat_ex *dst, struct timespec create_time);
+void update_stat_ex_file_id(struct stat_ex *dst, uint64_t file_id);
int sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf,
bool fake_dir_create_times);
int sys_fstat(int fd, SMB_STRUCT_STAT *sbuf,
diff --git a/source3/lib/system.c b/source3/lib/system.c
index d42ec3048cc..a67388e436a 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -349,6 +349,12 @@ void update_stat_ex_itime(struct stat_ex *dst,
dst->st_ex_iflags &= ~ST_EX_IFLAG_CALCULATED_ITIME;
}
+void update_stat_ex_file_id(struct stat_ex *dst, uint64_t file_id)
+{
+ dst->st_ex_file_id = file_id;
+ dst->st_ex_iflags &= ~ST_EX_IFLAG_CALCULATED_FILE_ID;
+}
+
void init_stat_ex_from_stat (struct stat_ex *dst,
const struct stat *src,
bool fake_dir_create_times)