summaryrefslogtreecommitdiff
path: root/source3/modules/onefs_dir.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-05-28 14:11:43 -0700
committerTim Prouty <tprouty@samba.org>2009-05-28 15:13:53 -0700
commit5c623e6c2e787cad6efde036161e8a2f816d5203 (patch)
treec45b71924a04a12edc19d2c5225cb305137dd935 /source3/modules/onefs_dir.c
parent0a455c12840cfb3ac23ee9fa0b79ebcc86a768da (diff)
downloadsamba-5c623e6c2e787cad6efde036161e8a2f816d5203.tar.gz
samba-5c623e6c2e787cad6efde036161e8a2f816d5203.tar.bz2
samba-5c623e6c2e787cad6efde036161e8a2f816d5203.zip
s3 onefs: update the onefs module to be compliant with stat_ex
Diffstat (limited to 'source3/modules/onefs_dir.c')
-rw-r--r--source3/modules/onefs_dir.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/modules/onefs_dir.c b/source3/modules/onefs_dir.c
index 47da33fff1..2ab8b86771 100644
--- a/source3/modules/onefs_dir.c
+++ b/source3/modules/onefs_dir.c
@@ -43,7 +43,7 @@
#define RDP_DIRENTRIES_SIZE ((size_t)(RDP_BATCH_SIZE * sizeof(struct dirent)))
static char *rdp_direntries = NULL;
-static SMB_STRUCT_STAT *rdp_stats = NULL;
+static struct stat *rdp_stats = NULL;
static uint64_t *rdp_cookies = NULL;
struct rdp_dir_state {
@@ -113,7 +113,7 @@ rdp_init(struct rdp_dir_state *dsp)
if (!rdp_stats) {
rdp_stats =
- SMB_MALLOC(RDP_BATCH_SIZE * sizeof(SMB_STRUCT_STAT));
+ SMB_MALLOC(RDP_BATCH_SIZE * sizeof(struct stat));
if (!rdp_stats)
return ENOMEM;
}
@@ -367,11 +367,15 @@ onefs_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
/* Return an entry from cache */
ret_direntp = ((SMB_STRUCT_DIRENT *)dsp->direntries_cursor);
if (sbuf) {
- *sbuf = rdp_stats[dsp->stat_cursor];
+ struct stat onefs_sbuf;
+
+ onefs_sbuf = rdp_stats[dsp->stat_cursor];
+ init_stat_ex_from_onefs_stat(sbuf, &onefs_sbuf);
+
/* readdirplus() sets st_ino field to 0, if it was
* unable to retrieve stat information for that
* particular directory entry. */
- if (sbuf->st_ino == 0)
+ if (sbuf->st_ex_ino == 0)
SET_STAT_INVALID(*sbuf);
}