diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-28 17:43:34 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-28 17:43:34 +0000 |
commit | 5dd78cfbf81d2f313c06af10cc82984dc6af28b6 (patch) | |
tree | 9aa05a4632a28cea3e0cb29f3bcd413ff536bad7 /apps/namedapp/binfs.c | |
parent | 82fb23b2cc78fade702316d00510efcf9d65954f (diff) | |
download | nuttx-5dd78cfbf81d2f313c06af10cc82984dc6af28b6.tar.gz nuttx-5dd78cfbf81d2f313c06af10cc82984dc6af28b6.tar.bz2 nuttx-5dd78cfbf81d2f313c06af10cc82984dc6af28b6.zip |
Fix an error in opendir() when a mountpoint is in the root directory.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3432 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/namedapp/binfs.c')
-rw-r--r-- | apps/namedapp/binfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/namedapp/binfs.c b/apps/namedapp/binfs.c index 9d2e4a7ee..a9aed59d6 100644 --- a/apps/namedapp/binfs.c +++ b/apps/namedapp/binfs.c @@ -310,7 +310,7 @@ static int binfs_opendir(struct inode *mountpt, const char *relpath, struct binfs_state_s *bm; int ret; - fvdbg("relpath: '%s'\n", relpath); + fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); /* Sanity checks */ @@ -352,8 +352,6 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) unsigned int index; int ret; - fvdbg("Entry\n"); - /* Sanity checks */ DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL); @@ -372,13 +370,14 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) * special error -ENOENT */ - fdbg("End of directory\n"); + fvdbg("Entry %d: End of directory\n", index); ret = -ENOENT; } else { /* Save the filename and file type */ + fvdbg("Entry %d: \"%s\"\n", index, namedapps[index].name); dir->fd_dir.d_type = DTYPE_FILE; strncpy(dir->fd_dir.d_name, namedapps[index].name, NAME_MAX+1); |