summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-28 19:03:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-28 19:03:44 +0000
commit2813ddd4e072e6cb148674d7a550a932405049a5 (patch)
tree309f24bf3f2dc5df4b111b21bb4b9c88f9e364bc /apps
parent5dd78cfbf81d2f313c06af10cc82984dc6af28b6 (diff)
downloadnuttx-2813ddd4e072e6cb148674d7a550a932405049a5.tar.gz
nuttx-2813ddd4e072e6cb148674d7a550a932405049a5.tar.bz2
nuttx-2813ddd4e072e6cb148674d7a550a932405049a5.zip
Fix backward conditional in binfs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3433 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
-rw-r--r--apps/namedapp/binfs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/namedapp/binfs.c b/apps/namedapp/binfs.c
index a9aed59d6..15ed4cc88 100644
--- a/apps/namedapp/binfs.c
+++ b/apps/namedapp/binfs.c
@@ -561,12 +561,6 @@ static int binfs_stat(struct inode *mountpt, const char *relpath, struct stat *b
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. */
if (namedapp_isavail(relpath) < 0)
@@ -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 */