diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html
index e5dfe63fee5..7a72ce04293 100644
--- a/Documentation/NuttShell.html
+++ b/Documentation/NuttShell.html
@@ -3736,7 +3736,7 @@ nsh>
df |
- !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_READABLE3 |
+ !CONFIG_DISABLE_MOUNTPOINT |
CONFIG_NSH_DISABLE_DF |
@@ -3785,7 +3785,7 @@ nsh>
CONFIG_NSH_DISABLE_GET |
- help4 |
+ help3 |
|
CONFIG_NSH_DISABLE_HELP |
@@ -3880,7 +3880,7 @@ nsh>
mount |
- !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_READABLE3 |
+ !CONFIG_DISABLE_MOUNTPOINT |
CONFIG_NSH_DISABLE_MOUNT |
@@ -4006,7 +4006,7 @@ nsh>
umount |
- !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_READABLE3 |
+ !CONFIG_DISABLE_MOUNTPOINT |
CONFIG_NSH_DISABLE_UMOUNT |
@@ -4062,10 +4062,6 @@ nsh>
Special TFTP server start-up options will probably be required to permit
creation of files for the correct operation of the put command.
3
- CONFIG_FS_READABLE is not a user configuration but is set automatically
- if any readable file system is selected. At present, this is either CONFIG_FS_FAT
- or CONFIG_FS_ROMFS.
- 4
Verbose help output can be suppressed by defining CONFIG_NSH_HELP_TERSE.
In that case, the help command is still available but will be slightly smaller.
diff --git a/fs/Kconfig b/fs/Kconfig
index 8715d2fce51..c5a516de5b0 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -59,19 +59,6 @@ config FS_READABLE
---help---
Automatically selected if any readable file system is selected
-config FS_WRITABLE
- bool "Writable file system"
- default n
- ---help---
- Automatically selected if any writable file system is selected. If
- not selected, support for writing will be disabled in all block
- drivers and also the block-to-character (BCH) layer and the MTD FTL
- layer.
-
- This selection can also be manually selected. You might want to do
- this if there are no writable file systems enabled, but you still
- want support for write access in block drivers and/or FTL.
-
source fs/aio/Kconfig
source fs/semaphore/Kconfig
source fs/mqueue/Kconfig
diff --git a/fs/driver/fs_blockpartition.c b/fs/driver/fs_blockpartition.c
index 898282aa7df..3e662af4ab8 100644
--- a/fs/driver/fs_blockpartition.c
+++ b/fs/driver/fs_blockpartition.c
@@ -70,10 +70,8 @@ static int part_open(FAR struct inode *inode);
static int part_close(FAR struct inode *inode);
static ssize_t part_read(FAR struct inode *inode, unsigned char *buffer,
size_t start_sector, unsigned int nsectors);
-#ifdef CONFIG_FS_WRITABLE
static ssize_t part_write(FAR struct inode *inode, const unsigned char *buffer,
size_t start_sector, unsigned int nsectors);
-#endif
static int part_geometry(FAR struct inode *inode, struct geometry *geometry);
static int part_ioctl(FAR struct inode *inode, int cmd, unsigned long arg);
@@ -90,11 +88,7 @@ static const struct block_operations g_part_bops =
part_open, /* open */
part_close, /* close */
part_read, /* read */
-#ifdef CONFIG_FS_WRITABLE
part_write, /* write */
-#else
- NULL, /* write */
-#endif
part_geometry, /* geometry */
part_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
@@ -180,7 +174,6 @@ static ssize_t part_read(FAR struct inode *inode, unsigned char *buffer,
*
****************************************************************************/
-#ifdef CONFIG_FS_WRITABLE
static ssize_t part_write(FAR struct inode *inode, const unsigned char *buffer,
size_t start_sector, unsigned int nsectors)
{
@@ -196,7 +189,6 @@ static ssize_t part_write(FAR struct inode *inode, const unsigned char *buffer,
return parent->u.i_bops->write(parent, buffer, start_sector, nsectors);
}
-#endif
/****************************************************************************
* Name: part_geometry
diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig
index 51610e27f5f..ebbaa97a1f7 100644
--- a/fs/fat/Kconfig
+++ b/fs/fat/Kconfig
@@ -8,7 +8,6 @@ config FS_FAT
default n
depends on !DISABLE_MOUNTPOINT
select FS_READABLE
- select FS_WRITABLE
---help---
Enable FAT filesystem support
diff --git a/fs/hostfs/Kconfig b/fs/hostfs/Kconfig
index 736692b729b..e5140078ad0 100644
--- a/fs/hostfs/Kconfig
+++ b/fs/hostfs/Kconfig
@@ -8,7 +8,6 @@ config FS_HOSTFS
default n
depends on !DISABLE_MOUNTPOINT
select FS_READABLE
- select FS_WRITABLE
---help---
The Host file system provides a mechanism to mount directories
from the host OS during simulation mode. The host directory
diff --git a/fs/littlefs/Kconfig b/fs/littlefs/Kconfig
index 8627b7be526..df403ed29a4 100644
--- a/fs/littlefs/Kconfig
+++ b/fs/littlefs/Kconfig
@@ -2,7 +2,6 @@ config FS_LITTLEFS
bool "LITTLEFS File System"
default n
select FS_READABLE
- select FS_WRITABLE
depends on !DISABLE_MOUNTPOINT
---help---
Build the LITTLEFS file system. https://github.com/ARMmbed/littlefs.
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index a25b3b57283..580ba64c137 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -8,7 +8,6 @@ config NFS
default n
depends on !DISABLE_MOUNTPOINT
select FS_READABLE
- select FS_WRITABLE
---help---
Enable network file system (NFS) client file system
diff --git a/fs/nxffs/Kconfig b/fs/nxffs/Kconfig
index 1a2284496c5..9232c52b65c 100644
--- a/fs/nxffs/Kconfig
+++ b/fs/nxffs/Kconfig
@@ -8,7 +8,6 @@ config FS_NXFFS
default n
depends on !DISABLE_MOUNTPOINT
select FS_READABLE
- select FS_WRITABLE
---help---
Enable NuttX FLASH file system (NXFF) support.
diff --git a/fs/smartfs/Kconfig b/fs/smartfs/Kconfig
index 877a5be1ea5..53ece0010e9 100644
--- a/fs/smartfs/Kconfig
+++ b/fs/smartfs/Kconfig
@@ -8,7 +8,6 @@ config FS_SMARTFS
default n
depends on !DISABLE_MOUNTPOINT
select FS_READABLE
- select FS_WRITABLE
---help---
Enable NuttX SMART Flash file system (SMARTFS) support.
diff --git a/fs/spiffs/Kconfig b/fs/spiffs/Kconfig
index 32cc60e4d6f..030a572dfbb 100644
--- a/fs/spiffs/Kconfig
+++ b/fs/spiffs/Kconfig
@@ -7,7 +7,6 @@ config FS_SPIFFS
bool "SPIFFS File System"
default n
select FS_READABLE
- select FS_WRITABLE
depends on !DISABLE_MOUNTPOINT
---help---
Build the SPIFFS file system. This is a port of version 0.3.7 of
diff --git a/fs/tmpfs/Kconfig b/fs/tmpfs/Kconfig
index 04ac7413a84..d1a473bbde9 100644
--- a/fs/tmpfs/Kconfig
+++ b/fs/tmpfs/Kconfig
@@ -8,7 +8,6 @@ config FS_TMPFS
default n
depends on !DISABLE_MOUNTPOINT
select FS_READABLE
- select FS_WRITABLE
---help---
Enable TMPFS filesystem support
diff --git a/fs/vfs/fs_mkdir.c b/fs/vfs/fs_mkdir.c
index e310b358595..8b31581aa24 100644
--- a/fs/vfs/fs_mkdir.c
+++ b/fs/vfs/fs_mkdir.c
@@ -1,35 +1,20 @@
/****************************************************************************
* fs/vfs/fs_mkdir.c
*
- * Copyright (C) 2007, 2008, 2014, 2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -54,8 +39,7 @@
****************************************************************************/
#undef FS_HAVE_WRITABLE_MOUNTPOINT
-#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_WRITABLE) && \
- CONFIG_NFILE_STREAMS > 0
+#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_STREAMS > 0
# define FS_HAVE_WRITABLE_MOUNTPOINT 1
#endif
diff --git a/fs/vfs/fs_rename.c b/fs/vfs/fs_rename.c
index e610f326d21..e6983b5b48b 100644
--- a/fs/vfs/fs_rename.c
+++ b/fs/vfs/fs_rename.c
@@ -1,35 +1,20 @@
/****************************************************************************
* fs/vfs/fs_rename.c
*
- * Copyright (C) 2007-2009, 2014, 2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -55,8 +40,7 @@
****************************************************************************/
#undef FS_HAVE_WRITABLE_MOUNTPOINT
-#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_WRITABLE) && \
- CONFIG_NFILE_STREAMS > 0
+#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_STREAMS > 0
# define FS_HAVE_WRITABLE_MOUNTPOINT 1
#endif
diff --git a/fs/vfs/fs_rmdir.c b/fs/vfs/fs_rmdir.c
index 33706756df3..3c90b8208a9 100644
--- a/fs/vfs/fs_rmdir.c
+++ b/fs/vfs/fs_rmdir.c
@@ -1,35 +1,20 @@
/****************************************************************************
* fs/vfs/fs_rmdir.c
*
- * Copyright (C) 2007-2009, 2014, 2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -53,8 +38,7 @@
****************************************************************************/
#undef FS_HAVE_WRITABLE_MOUNTPOINT
-#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_WRITABLE) && \
- CONFIG_NFILE_STREAMS > 0
+#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_STREAMS > 0
# define FS_HAVE_WRITABLE_MOUNTPOINT 1
#endif
diff --git a/fs/vfs/fs_unlink.c b/fs/vfs/fs_unlink.c
index 0cbd0785b6f..a84a83b7cf1 100644
--- a/fs/vfs/fs_unlink.c
+++ b/fs/vfs/fs_unlink.c
@@ -1,35 +1,20 @@
/****************************************************************************
* fs/vfs/fs_unlink.c
*
- * Copyright (C) 2007-2009, 2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 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.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -53,8 +38,7 @@
****************************************************************************/
#undef FS_HAVE_WRITABLE_MOUNTPOINT
-#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_WRITABLE) && \
- CONFIG_NFILE_STREAMS > 0
+#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_STREAMS > 0
# define FS_HAVE_WRITABLE_MOUNTPOINT 1
#endif