fstat: Add skeleton implmentations of fstat() in all file systems.

This commit is contained in:
Gregory Nutt
2017-02-12 13:42:27 -06:00
parent c5a8e96dbc
commit 7d91fabf01
13 changed files with 283 additions and 88 deletions

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* fs/binfs/fs_binfs.c
*
* Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013, 2015, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -70,6 +70,7 @@ static ssize_t binfs_read(FAR struct file *filep, char *buffer, size_t buflen);
static int binfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
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);
static int binfs_opendir(struct inode *mountpt, const char *relpath,
struct fs_dirent_s *dir);
@@ -108,6 +109,7 @@ const struct mountpt_operations binfs_operations =
NULL, /* sync */
binfs_dup, /* dup */
binfs_fstat, /* fstat */
binfs_opendir, /* opendir */
NULL, /* closedir */
@@ -245,6 +247,21 @@ static int binfs_dup(FAR const struct file *oldp, FAR struct file *newp)
return OK;
}
/****************************************************************************
* Name: binfs_fstat
*
* Description:
* Obtain information about an open file associated with the file
* descriptor 'fd', and will write it to the area pointed to by 'buf'.
*
****************************************************************************/
static int binfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
{
#warning Missing logic
return -ENOSYS;
}
/****************************************************************************
* Name: binfs_opendir
*