9
0
Fork 0

Fix backward conditional in binfs

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3433 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-03-28 19:03:44 +00:00
parent aa1599c285
commit 9ccf031808
1 changed files with 8 additions and 8 deletions

View File

@ -560,12 +560,6 @@ static int binfs_stat(struct inode *mountpt, const char *relpath, struct stat *b
/* The requested directory must be the volume-relative "root" directory */
if (relpath && relpath[0] != '\0')
{
/* It's a read-only directory name */
buf->st_mode = S_IFDIR|S_IROTH|S_IRGRP|S_IRUSR|S_IXOTH|S_IXGRP|S_IXUSR;
}
else
{
/* Check if there is a file with this name. */
@ -575,9 +569,15 @@ static int binfs_stat(struct inode *mountpt, const char *relpath, struct stat *b
goto errout_with_semaphore;
}
/* It's a read-only file name */
/* It's a execute-only file name */
buf->st_mode = S_IFREG|S_IROTH|S_IRGRP|S_IRUSR|S_IXOTH|S_IXGRP|S_IXUSR;
buf->st_mode = S_IFREG|S_IXOTH|S_IXGRP|S_IXUSR;
}
else
{
/* It's a read/execute-only directory name */
buf->st_mode = S_IFDIR|S_IROTH|S_IRGRP|S_IRUSR|S_IXOTH|S_IXGRP|S_IXUSR;
}
/* File/directory size, access block size */