From d06b346b5ca8ec5ad6ce44283f01e841fbd51520 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 12 Feb 2017 14:47:05 -0600 Subject: [PATCH] Add fstat support to binfs --- fs/binfs/fs_binfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/binfs/fs_binfs.c b/fs/binfs/fs_binfs.c index 43fd012bb6c..f084710792c 100644 --- a/fs/binfs/fs_binfs.c +++ b/fs/binfs/fs_binfs.c @@ -258,8 +258,15 @@ static int binfs_dup(FAR const struct file *oldp, FAR struct file *newp) static int binfs_fstat(FAR const struct file *filep, FAR struct stat *buf) { -#warning Missing logic - return -ENOSYS; + DEBUGASSERT(filep != NULL && buf != NULL); + + /* It's a execute-only file system */ + + buf->st_mode = S_IFREG | S_IXOTH | S_IXGRP | S_IXUSR; + buf->st_size = 0; + buf->st_blksize = 0; + buf->st_blocks = 0; + return OK; } /****************************************************************************