From 81507c53d76e34c4762c352ec08f7ab4ff130135 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 28 Mar 2011 19:03:44 +0000 Subject: [PATCH] Fix backward conditional in binfs git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3433 42af7a65-404d-4744-a932-0658087f49c3 --- namedapp/binfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/namedapp/binfs.c b/namedapp/binfs.c index a9aed59d6..15ed4cc88 100644 --- a/namedapp/binfs.c +++ b/namedapp/binfs.c @@ -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 */