mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
fs/: Remove support for CONFIG_FS_WRITABLE
This commit is contained in:
-13
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,6 @@ config FS_FAT
|
||||
default n
|
||||
depends on !DISABLE_MOUNTPOINT
|
||||
select FS_READABLE
|
||||
select FS_WRITABLE
|
||||
---help---
|
||||
Enable FAT filesystem support
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,6 @@ config FS_TMPFS
|
||||
default n
|
||||
depends on !DISABLE_MOUNTPOINT
|
||||
select FS_READABLE
|
||||
select FS_WRITABLE
|
||||
---help---
|
||||
Enable TMPFS filesystem support
|
||||
|
||||
|
||||
+13
-29
@@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* fs/vfs/fs_mkdir.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008, 2014, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
|
||||
|
||||
+13
-29
@@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* fs/vfs/fs_rename.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2014, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
|
||||
|
||||
+13
-29
@@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* fs/vfs/fs_rmdir.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2014, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
|
||||
|
||||
+13
-29
@@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* fs/vfs/fs_unlink.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user