diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-03 19:11:11 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-03 19:11:11 +0000 |
commit | a47fb3bd2fd48cd18b84c5020e0f90c58433bd43 (patch) | |
tree | da55e9fab23eebbf67c222daf2efe23f93daf1ec /nuttx/drivers | |
parent | 83be13bb8d9a206ebbd4d8282ec54f74a7340abc (diff) |
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.defs | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bch_internal.h | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchdev_driver.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchdev_register.c | 11 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchdev_unregister.c | 10 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchlib_cache.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchlib_read.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchlib_sem.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchlib_setup.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchlib_teardown.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/bch/bchlib_write.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/dev_zero.c | 10 |
12 files changed, 30 insertions, 19 deletions
diff --git a/nuttx/drivers/bch/Make.defs b/nuttx/drivers/bch/Make.defs index 8dc36b8c4f..bc22df8e26 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 ffda8151eb..fb1c642367 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 c80701449d..262a0af469 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 5bbedb6b92..924977371e 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 0532ff4aa1..8c7360882b 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 e7eca9bff6..3b8212a13f 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 0f880ab2a1..f4fad10969 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 b0c67a997f..1698ed0a54 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 00a2eada84..1026248b5a 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 a0c6592529..8657c4a697 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 fcba9ede81..8d7dcf26f9 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 079126c061..5435f80ea2 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); |