s3/lib: add update_stat_ex_file_id()
authorRalph Boehme <slow@samba.org>
Tue, 25 Jun 2019 12:24:17 +0000 (14:24 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 1 Jul 2019 21:43:23 +0000 (21:43 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/proto.h
source3/lib/system.c

index 84d19e4277dfd6d96f5f4024c339a4cd7ef93cf2..8b387f7c56327c921b75999970f3e1ccf73d6c8d 100644 (file)
@@ -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,
index d42ec3048cc4dd3731b2f456506ee917699e1f3c..a67388e436a8193785875751885b8458c20b85f7 100644 (file)
@@ -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)