Support for open of FAT fs

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@230 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-05-19 21:30:57 +00:00
parent 007667f845
commit e85f4186a4
10 changed files with 2246 additions and 891 deletions
+6 -6
View File
@@ -100,9 +100,9 @@ struct block_operations
int (*open)(FAR struct inode *inode);
int (*close)(FAR struct inode *inode);
ssize_t (*read)(FAR struct inode *inode, unsigned char *buffer,
size_t start_sector, size_t nsectors);
size_t start_sector, unsigned int nsectors);
ssize_t (*write)(FAR struct inode *inode, const unsigned char *buffer,
size_t start_sector, size_t nsectors);
size_t start_sector, unsigned int nsectors);
int (*geometry)(FAR struct inode *inode, struct geometry *geometry);
int (*ioctl)(FAR struct inode *inode, int cmd, unsigned long arg);
};
@@ -122,8 +122,8 @@ struct mountpt_operations
* information to manage privileges.
*/
int (*open)(FAR struct file *filp, FAR struct inode *inode,
const char *rel_path, int oflags, mode_t mode);
int (*open)(FAR struct file *filp, const char *rel_path,
int oflags, mode_t mode);
/* The following methods must be identical in signature and position because
* the struct file_operations and struct mountp_operations are treated like
@@ -189,8 +189,8 @@ struct file
#if CONFIG_NFILE_DESCRIPTORS > 0
struct filelist
{
sem_t fl_sem; /* Manage access to the file list */
sint16 fl_crefs; /* Reference count */
sem_t fl_sem; /* Manage access to the file list */
sint16 fl_crefs; /* Reference count */
struct file fl_files[CONFIG_NFILE_DESCRIPTORS];
};
#endif
+49
View File
@@ -0,0 +1,49 @@
/************************************************************
* stat.h
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
#ifndef __SYS_STAT_H
#define __SYS_STAT_H
/************************************************************
* Included Files
************************************************************/
#include <sys/types.h>
/************************************************************
* Type Definitions
************************************************************/
#endif /* __SYS_STAT_H */