summaryrefslogtreecommitdiff
path: root/nuttx/fs/nxffs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-28 16:58:43 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-28 16:58:43 -0600
commit25cc0eca88a732ee368f342af291df37f36016fe (patch)
tree6afde56ea025e7fc324e8c507c46595ef2198bc6 /nuttx/fs/nxffs
parente39ee98206f4d878d444e0700967573d2e2759a6 (diff)
downloadpx4-nuttx-25cc0eca88a732ee368f342af291df37f36016fe.tar.gz
px4-nuttx-25cc0eca88a732ee368f342af291df37f36016fe.tar.bz2
px4-nuttx-25cc0eca88a732ee368f342af291df37f36016fe.zip
nuttx/fs: Remove explicity references to errno. That is a problem from within the kernel for certain configurations
Diffstat (limited to 'nuttx/fs/nxffs')
-rw-r--r--nuttx/fs/nxffs/nxffs_ioctl.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_open.c8
-rw-r--r--nuttx/fs/nxffs/nxffs_read.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_write.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/fs/nxffs/nxffs_ioctl.c b/nuttx/fs/nxffs/nxffs_ioctl.c
index cdb651bfd..96d39c339 100644
--- a/nuttx/fs/nxffs/nxffs_ioctl.c
+++ b/nuttx/fs/nxffs/nxffs_ioctl.c
@@ -103,7 +103,7 @@ int nxffs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
ret = sem_wait(&volume->exclsem);
if (ret != OK)
{
- ret = -errno;
+ ret = -get_errno();
fdbg("ERROR: sem_wait failed: %d\n", ret);
goto errout;
}
diff --git a/nuttx/fs/nxffs/nxffs_open.c b/nuttx/fs/nxffs/nxffs_open.c
index 2970afbed..2859c31bd 100644
--- a/nuttx/fs/nxffs/nxffs_open.c
+++ b/nuttx/fs/nxffs/nxffs_open.c
@@ -404,7 +404,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
if (ret != OK)
{
fdbg("ERROR: sem_wait failed: %d\n", ret);
- ret = -errno;
+ ret = -get_errno();
goto errout;
}
@@ -417,7 +417,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
if (ret != OK)
{
fdbg("ERROR: sem_wait failed: %d\n", ret);
- ret = -errno;
+ ret = -get_errno();
goto errout_with_wrsem;
}
@@ -715,7 +715,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume,
if (ret != OK)
{
fdbg("ERROR: sem_wait failed: %d\n", ret);
- ret = -errno;
+ ret = -get_errno();
goto errout;
}
@@ -1160,7 +1160,7 @@ int nxffs_close(FAR struct file *filep)
ret = sem_wait(&volume->exclsem);
if (ret != OK)
{
- ret = -errno;
+ ret = -get_errno();
fdbg("ERROR: sem_wait failed: %d\n", ret);
goto errout;
}
diff --git a/nuttx/fs/nxffs/nxffs_read.c b/nuttx/fs/nxffs/nxffs_read.c
index 82a00d6b3..c548f5e50 100644
--- a/nuttx/fs/nxffs/nxffs_read.c
+++ b/nuttx/fs/nxffs/nxffs_read.c
@@ -184,7 +184,7 @@ ssize_t nxffs_read(FAR struct file *filep, FAR char *buffer, size_t buflen)
ret = sem_wait(&volume->exclsem);
if (ret != OK)
{
- ret = -errno;
+ ret = -get_errno();
fdbg("ERROR: sem_wait failed: %d\n", ret);
goto errout;
}
diff --git a/nuttx/fs/nxffs/nxffs_write.c b/nuttx/fs/nxffs/nxffs_write.c
index 19d3fea59..7f081b92d 100644
--- a/nuttx/fs/nxffs/nxffs_write.c
+++ b/nuttx/fs/nxffs/nxffs_write.c
@@ -474,7 +474,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer, size_t bufle
ret = sem_wait(&volume->exclsem);
if (ret != OK)
{
- ret = -errno;
+ ret = -get_errno();
fdbg("ERROR: sem_wait failed: %d\n", ret);
goto errout;
}