summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_read.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-27 21:17:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-27 21:17:21 +0000
commit148cde5e982950ad5836fa96baa466de842e1c14 (patch)
treebf737b367b91c5da81345eb21016b07400d7a72f /nuttx/fs/fs_read.c
parentf6b81a790c28d7d36d9de33810df5270c1ebbfd7 (diff)
downloadpx4-nuttx-148cde5e982950ad5836fa96baa466de842e1c14.tar.gz
px4-nuttx-148cde5e982950ad5836fa96baa466de842e1c14.tar.bz2
px4-nuttx-148cde5e982950ad5836fa96baa466de842e1c14.zip
Finally, a clean SDCC compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@20 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_read.c')
-rw-r--r--nuttx/fs/fs_read.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/nuttx/fs/fs_read.c b/nuttx/fs/fs_read.c
index a092d0db6..1bbcdead0 100644
--- a/nuttx/fs/fs_read.c
+++ b/nuttx/fs/fs_read.c
@@ -57,7 +57,7 @@
int read(int fd, void *buf, unsigned int nbytes)
{
- struct filelist *list;
+ FAR struct filelist *list;
int ret = EBADF;
/* Get the thread-specific file list */
@@ -73,23 +73,23 @@ int read(int fd, void *buf, unsigned int nbytes)
if ((unsigned int)fd < CONFIG_NFILE_DESCRIPTORS)
{
- struct file *this_file = &list->fl_files[fd];
+ FAR struct file *this_file = &list->fl_files[fd];
/* Was this file opened for read access? */
if ((this_file->f_oflags & O_RDOK) != 0)
- {
+ {
struct inode *inode = this_file->f_inode;
- /* Is a driver registered? Does it support the read method? */
+ /* Is a driver registered? Does it support the read method? */
- if (inode && inode->i_ops && inode->i_ops->read)
- {
- /* Yes, then let it perform the read */
+ if (inode && inode->i_ops && inode->i_ops->read)
+ {
+ /* Yes, then let it perform the read */
- ret = (int)inode->i_ops->read(this_file, (char*)buf, (size_t)nbytes);
- }
- }
+ ret = (int)inode->i_ops->read(this_file, (char*)buf, (size_t)nbytes);
+ }
+ }
}
return ret;
}