mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
fs/tmpfs: fix compile error
make[2]: Entering directory '/home/ligd/platform/mirtos2/apps'
tmpfs/fs_tmpfs.c: In function 'tmpfs_rewinddir':
tmpfs/fs_tmpfs.c:2084:27: error: 'tdo' undeclared (first use in this function)
2084 | dir->u.tmpfs.tf_index = tdo->tdo_nentries;
| ^~~
tmpfs/fs_tmpfs.c:2084:27: note: each undeclared identifier is reported only once for each function it appears in
Makefile:94: recipe for target 'fs_tmpfs.o' failed
make[1]: *** [fs_tmpfs.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: 'libwireless.a' is up to date.
Change-Id: I3846efa802fc6104bf908b8927138b9dd18f1227
This commit is contained in:
@@ -2076,9 +2076,16 @@ static int tmpfs_readdir(FAR struct inode *mountpt,
|
||||
static int tmpfs_rewinddir(FAR struct inode *mountpt,
|
||||
FAR struct fs_dirent_s *dir)
|
||||
{
|
||||
FAR struct tmpfs_directory_s *tdo;
|
||||
|
||||
finfo("mountpt: %p dir: %p\n", mountpt, dir);
|
||||
DEBUGASSERT(mountpt != NULL && dir != NULL);
|
||||
|
||||
/* Get the directory structure from the dir argument and lock it */
|
||||
|
||||
tdo = dir->u.tmpfs.tf_tdo;
|
||||
DEBUGASSERT(tdo != NULL);
|
||||
|
||||
/* Set the readdir index pass the end */
|
||||
|
||||
dir->u.tmpfs.tf_index = tdo->tdo_nentries;
|
||||
|
||||
Reference in New Issue
Block a user