diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-28 11:17:36 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-28 11:17:36 -0600 |
commit | ba8399e078530eb07fbd8b058c90e4260d166518 (patch) | |
tree | 59bd16eaa3f91d2f02db320b282633df1b1323e2 | |
parent | 5f4a524f9ca77dfa108ce3c68eeb036f64815ff1 (diff) | |
download | nuttx-ba8399e078530eb07fbd8b058c90e4260d166518.tar.gz nuttx-ba8399e078530eb07fbd8b058c90e4260d166518.tar.bz2 nuttx-ba8399e078530eb07fbd8b058c90e4260d166518.zip |
Move directory operations from fs/ to fs/dirent
-rw-r--r-- | nuttx/fs/Makefile | 17 | ||||
-rw-r--r-- | nuttx/fs/dirent/Make.defs | 47 | ||||
-rw-r--r-- | nuttx/fs/dirent/fs_closedir.c (renamed from nuttx/fs/fs_closedir.c) | 2 | ||||
-rw-r--r-- | nuttx/fs/dirent/fs_opendir.c (renamed from nuttx/fs/fs_opendir.c) | 2 | ||||
-rw-r--r-- | nuttx/fs/dirent/fs_readdir.c (renamed from nuttx/fs/fs_readdir.c) | 2 | ||||
-rw-r--r-- | nuttx/fs/dirent/fs_rewinddir.c (renamed from nuttx/fs/fs_rewinddir.c) | 2 | ||||
-rw-r--r-- | nuttx/fs/driver/fs_syslog.c (renamed from nuttx/fs/fs_syslog.c) | 0 |
7 files changed, 55 insertions, 17 deletions
diff --git a/nuttx/fs/Makefile b/nuttx/fs/Makefile index 856cc231c..68a32ccf0 100644 --- a/nuttx/fs/Makefile +++ b/nuttx/fs/Makefile @@ -61,11 +61,10 @@ else # Common file/socket descriptor support -CSRCS += fs_close.c fs_closedir.c fs_dup.c fs_dup2.c fs_fcntl.c -CSRCS += fs_filedup.c fs_filedup2.c fs_ioctl.c fs_lseek.c fs_mkdir.c -CSRCS += fs_open.c fs_opendir.c fs_poll.c fs_read.c fs_readdir.c -CSRCS += fs_rename.c fs_rewinddir.c fs_rmdir.c fs_seekdir.c fs_stat.c -CSRCS += fs_statfs.c fs_select.c fs_unlink.c fs_write.c +CSRCS += fs_close.c fs_dup.c fs_dup2.c fs_fcntl.c fs_filedup.c fs_filedup2.c +CSRCS += fs_ioctl.c fs_lseek.c fs_mkdir.c fs_open.c fs_poll.c fs_read.c +CSRCS += fs_rename.c fs_rmdir.c fs_seekdir.c fs_stat.c fs_statfs.c +CSRCS += fs_select.c fs_unlink.c fs_write.c DEPPATH = --dep-path . VPATH = . @@ -86,14 +85,6 @@ ifeq ($(CONFIG_NET_SENDFILE),y) CSRCS += fs_sendfile.c endif -# System logging to a character device (or file) - -ifeq ($(CONFIG_SYSLOG),y) -ifeq ($(CONFIG_SYSLOG_CHAR),y) -CSRCS += fs_syslog.c -endif -endif - # Additional files required is mount-able file systems are supported ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y) diff --git a/nuttx/fs/dirent/Make.defs b/nuttx/fs/dirent/Make.defs new file mode 100644 index 000000000..392fa444e --- /dev/null +++ b/nuttx/fs/dirent/Make.defs @@ -0,0 +1,47 @@ +############################################################################ +# fs/dirent/Make.defs +# +# Copyright (C) 2014 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 +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +# Don't build anything if there are no file descriptors + +ifneq ($(CONFIG_NFILE_DESCRIPTORS),0) + +CSRCS += fs_closedir.c fs_opendir.c fs_readdir.c fs_rewinddir.c + +# Include dirent build support + +DEPPATH += --dep-path dirent +VPATH += :dirent +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)fs$(DELIM)dirent} +endif diff --git a/nuttx/fs/fs_closedir.c b/nuttx/fs/dirent/fs_closedir.c index 65c845a1a..2f70d8517 100644 --- a/nuttx/fs/fs_closedir.c +++ b/nuttx/fs/dirent/fs_closedir.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs/fs_closedir.c + * fs/dirent/fs_closedir.c * * Copyright (C) 2007-2009, 2011, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> diff --git a/nuttx/fs/fs_opendir.c b/nuttx/fs/dirent/fs_opendir.c index 865c644b9..dbbc9b78e 100644 --- a/nuttx/fs/fs_opendir.c +++ b/nuttx/fs/dirent/fs_opendir.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs/fs_opendir.c + * fs/dirent/fs_opendir.c * * Copyright (C) 2007-2009, 2011, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> diff --git a/nuttx/fs/fs_readdir.c b/nuttx/fs/dirent/fs_readdir.c index eba40109e..6d87ce7b0 100644 --- a/nuttx/fs/fs_readdir.c +++ b/nuttx/fs/dirent/fs_readdir.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs/fs_readdir.c + * fs/dirent/fs_readdir.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> diff --git a/nuttx/fs/fs_rewinddir.c b/nuttx/fs/dirent/fs_rewinddir.c index c6bb295cb..ccb49abd4 100644 --- a/nuttx/fs/fs_rewinddir.c +++ b/nuttx/fs/dirent/fs_rewinddir.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs/fs_rewinddir.c + * fs/dirent/fs_rewinddir.c * * Copyright (C) 2007-2009, 2011, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> diff --git a/nuttx/fs/fs_syslog.c b/nuttx/fs/driver/fs_syslog.c index 053720747..053720747 100644 --- a/nuttx/fs/fs_syslog.c +++ b/nuttx/fs/driver/fs_syslog.c |