summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-04 20:49:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-04 20:49:47 +0000
commit99a753f17a5f82ae34fbbbc564757bb99666afbd (patch)
treee5ab1ef913b7324c1e05d2a6a7a37171f24e2af5 /nuttx/fs
parent10b9a1fa0c8d68bb7f2c6fac7176669052831401 (diff)
downloadpx4-nuttx-99a753f17a5f82ae34fbbbc564757bb99666afbd.tar.gz
px4-nuttx-99a753f17a5f82ae34fbbbc564757bb99666afbd.tar.bz2
px4-nuttx-99a753f17a5f82ae34fbbbc564757bb99666afbd.zip
Fix buffer full test in generic CAN driver (plus fixes to comments)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4259 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fs_stat.c12
-rw-r--r--nuttx/fs/fs_statfs.c28
2 files changed, 20 insertions, 20 deletions
diff --git a/nuttx/fs/fs_stat.c b/nuttx/fs/fs_stat.c
index 85c91bd4e..138d6a2c1 100644
--- a/nuttx/fs/fs_stat.c
+++ b/nuttx/fs/fs_stat.c
@@ -1,8 +1,8 @@
/****************************************************************************
* fs/fs_stat.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009 , 2012Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -187,7 +187,7 @@ int stat(const char *path, FAR struct stat *buf)
if (inode->u.i_mops && inode->u.i_mops->stat)
{
- /* Perform the rewinddir() operation */
+ /* Perform the stat() operation */
ret = inode->u.i_mops->stat(inode, relpath, buf);
}
@@ -215,10 +215,10 @@ int stat(const char *path, FAR struct stat *buf)
/* Failure conditions always set the errno appropriately */
- errout_with_inode:
+errout_with_inode:
inode_release(inode);
- errout:
- *get_errno_ptr() = ret;
+errout:
+ set_errno(ret);
return ERROR;
}
diff --git a/nuttx/fs/fs_statfs.c b/nuttx/fs/fs_statfs.c
index 9ce15efbf..540eb86bb 100644
--- a/nuttx/fs/fs_statfs.c
+++ b/nuttx/fs/fs_statfs.c
@@ -1,8 +1,8 @@
/****************************************************************************
* fs/fs_statfs.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -57,10 +57,10 @@
static inline int statpsuedofs(FAR struct inode *inode, FAR struct statfs *buf)
{
- memset(buf, 0, sizeof(struct statfs));
- buf->f_type = PROC_SUPER_MAGIC;
- buf->f_namelen = NAME_MAX;
- return OK;
+ memset(buf, 0, sizeof(struct statfs));
+ buf->f_type = PROC_SUPER_MAGIC;
+ buf->f_namelen = NAME_MAX;
+ return OK;
}
/****************************************************************************
@@ -116,7 +116,7 @@ int statfs(FAR const char *path, FAR struct statfs *buf)
goto errout;
}
- /* The way we handle the stat depends on the type of inode that we
+ /* The way we handle the statfs depends on the type of inode that we
* are dealing with.
*/
@@ -124,12 +124,12 @@ int statfs(FAR const char *path, FAR struct statfs *buf)
if (INODE_IS_MOUNTPT(inode))
{
/* The node is a file system mointpoint. Verify that the mountpoint
- * supports the stat() method
+ * supports the statfs() method
*/
if (inode->u.i_mops && inode->u.i_mops->statfs)
{
- /* Perform the rewinddir() operation */
+ /* Perform the statfs() operation */
ret = inode->u.i_mops->statfs(inode, buf);
}
@@ -142,7 +142,7 @@ int statfs(FAR const char *path, FAR struct statfs *buf)
ret = statpsuedofs(inode, buf);
}
- /* Check if the stat operation was successful */
+ /* Check if the statfs operation was successful */
if (ret < 0)
{
@@ -150,16 +150,16 @@ int statfs(FAR const char *path, FAR struct statfs *buf)
goto errout_with_inode;
}
- /* Successfully stat'ed the file */
+ /* Successfully statfs'ed the file */
inode_release(inode);
return OK;
/* Failure conditions always set the errno appropriately */
- errout_with_inode:
+errout_with_inode:
inode_release(inode);
- errout:
- *get_errno_ptr() = ret;
+errout:
+ set_errno(ret);
return ERROR;
}