mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
Add capability to traverse inodes in the NuttX psuedo-filesystem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5004 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+9
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user