summaryrefslogtreecommitdiff
path: root/source4/ntvfs/simple/svfs_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/simple/svfs_util.c')
-rw-r--r--source4/ntvfs/simple/svfs_util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c
index a8a88cfad0..baa6f86d94 100644
--- a/source4/ntvfs/simple/svfs_util.c
+++ b/source4/ntvfs/simple/svfs_util.c
@@ -160,3 +160,14 @@ uint16 svfs_unix_to_dos_attrib(mode_t mode)
if (!(mode & S_IWUSR)) ret |= FILE_ATTRIBUTE_READONLY;
return ret;
}
+
+/*
+ build a file_id from a stat struct
+*/
+large_t svfs_file_id(struct stat *st)
+{
+ large_t ret = st->st_ino;
+ ret <<= 32;
+ ret |= st->st_dev;
+ return ret;
+}