diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index 2be7552d89d2aa736093760a4685f257d8bc2eb8..79e8a8c0c6eb97feff372ba750ad97f451c3962b 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -578,6 +578,11 @@ int dfs_file_stat(const char *path, struct stat *buf) return -ENOENT; } + dfs_fm_lock(); + /* FIXME */ + buf->st_ino = (size_t)dfs_fnode_find(fullpath, NULL); + dfs_fm_unlock(); + if ((fullpath[0] == '/' && fullpath[1] == '\0') || (dfs_subdir(fs->path, fullpath) == NULL)) { diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c index 96d8ecc3c9ef73a3cb63c446b1fb86f6d2d7181e..dc81f3d516f6fbfa06102f892d497352bd4a2498 100644 --- a/components/dfs/src/dfs_posix.c +++ b/components/dfs/src/dfs_posix.c @@ -339,6 +339,8 @@ int fstat(int fildes, struct stat *buf) /* it's the root directory */ buf->st_dev = 0; + /* FIXME */ + buf->st_ino = (size_t)d->fnode; buf->st_mode = S_IFREG | S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH;