aboutsummaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-08-03 19:11:11 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-08-03 19:11:11 +0000
commit07b635386da6ed220d4f5c2a36f7e869b4e5b2a5 (patch)
treeda55e9fab23eebbf67c222daf2efe23f93daf1ec /nuttx/drivers
parentfe26494ea8673246adda770689a8dea11176a47d (diff)
downloadpx4-firmware-07b635386da6ed220d4f5c2a36f7e869b4e5b2a5.tar.gz
px4-firmware-07b635386da6ed220d4f5c2a36f7e869b4e5b2a5.tar.bz2
px4-firmware-07b635386da6ed220d4f5c2a36f7e869b4e5b2a5.zip
Add capability to traverse inodes in the NuttX psuedo-filesystem
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5004 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/bch/Make.defs2
-rw-r--r--nuttx/drivers/bch/bch_internal.h2
-rw-r--r--nuttx/drivers/bch/bchdev_driver.c2
-rw-r--r--nuttx/drivers/bch/bchdev_register.c11
-rw-r--r--nuttx/drivers/bch/bchdev_unregister.c10
-rw-r--r--nuttx/drivers/bch/bchlib_cache.c2
-rw-r--r--nuttx/drivers/bch/bchlib_read.c2
-rw-r--r--nuttx/drivers/bch/bchlib_sem.c2
-rw-r--r--nuttx/drivers/bch/bchlib_setup.c2
-rw-r--r--nuttx/drivers/bch/bchlib_teardown.c2
-rw-r--r--nuttx/drivers/bch/bchlib_write.c2
-rw-r--r--nuttx/drivers/dev_zero.c10
12 files changed, 30 insertions, 19 deletions
diff --git a/nuttx/drivers/bch/Make.defs b/nuttx/drivers/bch/Make.defs
index 8dc36b8c4..bc22df8e2 100644
--- a/nuttx/drivers/bch/Make.defs
+++ b/nuttx/drivers/bch/Make.defs
@@ -2,7 +2,7 @@
# drivers/bch/Make.defs
#
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# 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
diff --git a/nuttx/drivers/bch/bch_internal.h b/nuttx/drivers/bch/bch_internal.h
index ffda8151e..fb1c64236 100644
--- a/nuttx/drivers/bch/bch_internal.h
+++ b/nuttx/drivers/bch/bch_internal.h
@@ -2,7 +2,7 @@
* drivers/bch/bch_internal.h
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/bch/bchdev_driver.c b/nuttx/drivers/bch/bchdev_driver.c
index c80701449..262a0af46 100644
--- a/nuttx/drivers/bch/bchdev_driver.c
+++ b/nuttx/drivers/bch/bchdev_driver.c
@@ -2,7 +2,7 @@
* drivers/bch/bchdev_driver.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/bch/bchdev_register.c b/nuttx/drivers/bch/bchdev_register.c
index 5bbedb6b9..924977371 100644
--- a/nuttx/drivers/bch/bchdev_register.c
+++ b/nuttx/drivers/bch/bchdev_register.c
@@ -1,8 +1,8 @@
/****************************************************************************
* drivers/bch/bchdev_register.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-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
@@ -70,12 +70,13 @@
* Name: bchdev_register
*
* Description:
- * Setup so that it exports the block driver referenced by
- * 'blkdev' as a character device 'chardev'
+ * Setup so that it exports the block driver referenced by 'blkdev' as a
+ * character device 'chardev'
*
****************************************************************************/
-int bchdev_register(const char *blkdev, const char *chardev, bool readonly)
+int bchdev_register(FAR const char *blkdev, FAR const char *chardev,
+ bool readonly)
{
FAR void *handle;
int ret;
diff --git a/nuttx/drivers/bch/bchdev_unregister.c b/nuttx/drivers/bch/bchdev_unregister.c
index 0532ff4aa..8c7360882 100644
--- a/nuttx/drivers/bch/bchdev_unregister.c
+++ b/nuttx/drivers/bch/bchdev_unregister.c
@@ -1,8 +1,8 @@
/****************************************************************************
* drivers/bch/bchdev_unregister.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-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
@@ -78,11 +78,12 @@
* Name: bchdev_unregister
*
* Description:
- * Undo the setup performed by losetup
+ * Unregister character driver access to a block device that was created
+ * by a previous call to bchdev_register().
*
****************************************************************************/
-int bchdev_unregister(const char *chardev)
+int bchdev_unregister(FAR const char *chardev)
{
FAR struct bchlib_s *bch;
int fd;
@@ -144,6 +145,7 @@ int bchdev_unregister(const char *chardev)
{
goto errout_with_lock;
}
+
sched_unlock();
/* Release the internal structure */
diff --git a/nuttx/drivers/bch/bchlib_cache.c b/nuttx/drivers/bch/bchlib_cache.c
index e7eca9bff..3b8212a13 100644
--- a/nuttx/drivers/bch/bchlib_cache.c
+++ b/nuttx/drivers/bch/bchlib_cache.c
@@ -2,7 +2,7 @@
* drivers/bch/bchlib_cache.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/bch/bchlib_read.c b/nuttx/drivers/bch/bchlib_read.c
index 0f880ab2a..f4fad1096 100644
--- a/nuttx/drivers/bch/bchlib_read.c
+++ b/nuttx/drivers/bch/bchlib_read.c
@@ -2,7 +2,7 @@
* drivers/bch/bchlib_read.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/bch/bchlib_sem.c b/nuttx/drivers/bch/bchlib_sem.c
index b0c67a997..1698ed0a5 100644
--- a/nuttx/drivers/bch/bchlib_sem.c
+++ b/nuttx/drivers/bch/bchlib_sem.c
@@ -2,7 +2,7 @@
* drivers/bch/bchlib_sem.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/bch/bchlib_setup.c b/nuttx/drivers/bch/bchlib_setup.c
index 00a2eada8..1026248b5 100644
--- a/nuttx/drivers/bch/bchlib_setup.c
+++ b/nuttx/drivers/bch/bchlib_setup.c
@@ -2,7 +2,7 @@
* drivers/bch/bchlib_setup.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/bch/bchlib_teardown.c b/nuttx/drivers/bch/bchlib_teardown.c
index a0c659252..8657c4a69 100644
--- a/nuttx/drivers/bch/bchlib_teardown.c
+++ b/nuttx/drivers/bch/bchlib_teardown.c
@@ -2,7 +2,7 @@
* drivers/bch/bchlib_teardown.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/bch/bchlib_write.c b/nuttx/drivers/bch/bchlib_write.c
index fcba9ede8..8d7dcf26f 100644
--- a/nuttx/drivers/bch/bchlib_write.c
+++ b/nuttx/drivers/bch/bchlib_write.c
@@ -2,7 +2,7 @@
* drivers/bch/bchlib_write.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
diff --git a/nuttx/drivers/dev_zero.c b/nuttx/drivers/dev_zero.c
index 079126c06..5435f80ea 100644
--- a/nuttx/drivers/dev_zero.c
+++ b/nuttx/drivers/dev_zero.c
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/dev_null.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -121,6 +121,14 @@ static int devzero_poll(FAR struct file *filp, FAR struct pollfd *fds,
* Public Functions
****************************************************************************/
+/****************************************************************************
+ * Name: devzero_register
+ *
+ * Description:
+ * Register /dev/zero
+ *
+ ****************************************************************************/
+
void devzero_register(void)
{
(void)register_driver("/dev/zero", &devzero_fops, 0666, NULL);