Skip to content
Permalink
Browse files

cleanup: include/: move fs.h to fs/fs.h

move fs.h to fs/fs.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jun 25, 2019
1 parent 52b3d2b commit 656f4dfdac8d8a9c3d907a2bd9ec822b6b088a81
Showing with 556 additions and 541 deletions.
  1. +4 −484 include/fs.h
  2. +495 −0 include/fs/fs.h
  3. +1 −1 include/misc/fdtable.h
  4. +1 −1 include/posix/dirent.h
  5. +1 −1 include/posix/unistd.h
  6. +1 −1 lib/gui/lvgl/lvgl_fs.c
  7. +1 −1 samples/subsys/fs/src/main.c
  8. +1 −1 samples/subsys/mgmt/mcumgr/smp_svr/src/main.c
  9. +1 −1 samples/subsys/usb/mass/src/main.c
  10. +1 −1 subsys/fs/fat_fs.c
  11. +1 −1 subsys/fs/fs.c
  12. +1 −1 subsys/fs/fuse_fs_access.c
  13. +1 −1 subsys/fs/nffs_fs.c
  14. +1 −1 subsys/fs/shell.c
  15. +1 −1 subsys/settings/src/settings_file.c
  16. +1 −1 subsys/settings/src/settings_init.c
  17. +1 −1 tests/posix/fs/src/test_fat_mount.c
  18. +1 −1 tests/subsys/fs/fat_fs_api/src/test_fat.h
  19. +1 −1 tests/subsys/fs/fat_fs_dual_drive/src/test_fat.h
  20. +1 −1 tests/subsys/fs/multi-fs/src/nffs_test_utils.c
  21. +1 −1 tests/subsys/fs/multi-fs/src/test_fat.h
  22. +1 −1 tests/subsys/fs/multi-fs/src/test_fs_shell.h
  23. +1 −1 tests/subsys/fs/multi-fs/src/test_nffs.h
  24. +1 −1 tests/subsys/fs/multi-fs/src/test_nffs_dir.c
  25. +1 −1 tests/subsys/fs/multi-fs/src/test_nffs_file.c
  26. +1 −1 tests/subsys/fs/multi-fs/src/test_nffs_mount.c
  27. +1 −1 tests/subsys/fs/nffs_fs_api/common/nffs_test_system_01.c
  28. +1 −1 tests/subsys/fs/nffs_fs_api/common/nffs_test_utils.c
  29. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_append.c
  30. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_cache_large_file.c
  31. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_corrupt_block.c
  32. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_corrupt_scratch.c
  33. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_gc.c
  34. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_gc_on_oom.c
  35. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_incomplete_block.c
  36. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_large_system.c
  37. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_large_unlink.c
  38. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_large_write.c
  39. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_long_filename.c
  40. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_lost_found.c
  41. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_many_children.c
  42. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_mkdir.c
  43. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_mount.c
  44. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_nffs.h
  45. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_open.c
  46. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_overwrite_many.c
  47. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_overwrite_one.c
  48. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_overwrite_three.c
  49. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_overwrite_two.c
  50. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_performance.c
  51. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_read.c
  52. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_readdir.c
  53. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_rename.c
  54. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_split_file.c
  55. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_unlink.c
  56. +1 −1 tests/subsys/fs/nffs_fs_api/common/test_wear_level.c
  57. +1 −1 tests/subsys/settings/nffs/src/settings_setup_nffs.c
  58. +1 −1 tests/subsys/settings/nffs/src/settings_test.h
  59. +1 −1 tests/subsys/settings/nffs/src/settings_test_empty_file.c

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -9,7 +9,7 @@
#include <stdarg.h>
#include <sys/types.h>
/* FIXME: For native_posix ssize_t, off_t. */
#include <fs.h>
#include <fs/fs.h>

#ifdef __cplusplus
extern "C" {
@@ -14,7 +14,7 @@ extern "C" {
#include "posix_types.h"

#ifdef CONFIG_POSIX_FS
#include <fs.h>
#include <fs/fs.h>

typedef void DIR;

@@ -18,7 +18,7 @@ extern "C" {
#endif

#ifdef CONFIG_POSIX_API
#include <fs.h>
#include <fs/fs.h>

/* File related operations */
extern int open(const char *name, int flags);
@@ -6,7 +6,7 @@

#include <lvgl.h>
#include <zephyr.h>
#include <fs.h>
#include <fs/fs.h>

/* Stub for LVGL ufs (ram based FS) init function
* as we use Zephyr FS API instead
@@ -10,7 +10,7 @@
#include <device.h>
#include <disk_access.h>
#include <logging/log.h>
#include <fs.h>
#include <fs/fs.h>
#include <ff.h>

LOG_MODULE_REGISTER(main);
@@ -13,7 +13,7 @@

#ifdef CONFIG_MCUMGR_CMD_FS_MGMT
#include <device.h>
#include <fs.h>
#include <fs/fs.h>
#include "fs_mgmt/fs_mgmt.h"
#include <nffs/nffs.h>
#endif
@@ -12,7 +12,7 @@
LOG_MODULE_REGISTER(main);

#if CONFIG_DISK_ACCESS_FLASH && CONFIG_FAT_FILESYSTEM_ELM
#include <fs.h>
#include <fs/fs.h>
#include <ff.h>

static FATFS fat_fs;
@@ -10,7 +10,7 @@
#include <zephyr/types.h>
#include <errno.h>
#include <init.h>
#include <fs.h>
#include <fs/fs.h>
#include <misc/__assert.h>
#include <ff.h>

@@ -9,7 +9,7 @@
#include <zephyr/types.h>
#include <errno.h>
#include <init.h>
#include <fs.h>
#include <fs/fs.h>


#define LOG_LEVEL CONFIG_FS_LOG_LEVEL
@@ -19,7 +19,7 @@
#include <sys/types.h>

#include <zephyr.h>
#include <fs.h>
#include <fs/fs.h>

#include "cmdline.h"
#include "soc.h"
@@ -10,7 +10,7 @@
#include <errno.h>
#include <init.h>
#include <flash.h>
#include <fs.h>
#include <fs/fs.h>
#include <crc.h>
#include <misc/__assert.h>
#include <misc/printk.h>
@@ -9,7 +9,7 @@
#include <string.h>
#include <shell/shell.h>
#include <init.h>
#include <fs.h>
#include <fs/fs.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
@@ -8,7 +8,7 @@
#include <string.h>
#include <zephyr.h>

#include <fs.h>
#include <fs/fs.h>

#include "settings/settings.h"
#include "settings/settings_file.h"
@@ -23,7 +23,7 @@ void settings_init(void);
int settings_backend_init(void);

#ifdef CONFIG_SETTINGS_FS
#include <fs.h>
#include <fs/fs.h>

static struct settings_file config_init_settings_file = {
.cf_name = CONFIG_SETTINGS_FS_FILE,
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <fs.h>
#include <fs/fs.h>
#include <ff.h>
#include "test_fs.h"

@@ -6,7 +6,7 @@

#include <zephyr.h>
#include <ztest.h>
#include <fs.h>
#include <fs/fs.h>

#define FATFS_MNTP "/NAND:"
#define TEST_FILE FATFS_MNTP"/testfile.txt"
@@ -6,7 +6,7 @@

#include <zephyr.h>
#include <ztest.h>
#include <fs.h>
#include <fs/fs.h>

/* Make sure to match the drive name to ELM FAT Lib volume strings */
#define FATFS_MNTP "/RAM:"
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <fs.h>
#include <fs/fs.h>
#include <nffs/queue.h>
#include <nffs/nffs.h>
#include <nffs/os.h>
@@ -6,7 +6,7 @@

#include <zephyr.h>
#include <ztest.h>
#include <fs.h>
#include <fs/fs.h>

#define FATFS_MNTP "/RAM:"
#define TEST_FILE FATFS_MNTP"/testfile.txt"
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <fs.h>
#include <fs/fs.h>

void test_fs_help(void);
void test_fs_fat_mount(void);
@@ -6,7 +6,7 @@

#include <zephyr.h>
#include <ztest.h>
#include <fs.h>
#include <fs/fs.h>
#include <nffs/nffs.h>

void test_nffs_mount(void);
@@ -6,7 +6,7 @@

#include <stdint.h>
#include <stdio.h>
#include <fs.h>
#include <fs/fs.h>
#include <ztest.h>
#include <ztest_assert.h>
#include "nffs_test_utils.h"
@@ -6,7 +6,7 @@

#include <stdint.h>
#include <stdio.h>
#include <fs.h>
#include <fs/fs.h>
#include <ztest.h>
#include <ztest_assert.h>
#include "nffs_test_utils.h"
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stdio.h>
#include <device.h>
#include <fs.h>
#include <fs/fs.h>
#include <ztest.h>
#include <ztest_assert.h>
#include "nffs_test_utils.h"
@@ -26,7 +26,7 @@
#include <stdint.h>
#include <stddef.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"

const struct nffs_test_file_desc *nffs_test_system_01 =
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <fs.h>
#include <fs/fs.h>
#include <nffs/queue.h>
#include <nffs/nffs.h>
#include <nffs/os.h>
@@ -23,7 +23,7 @@

#include <stdint.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest_assert.h>

@@ -23,7 +23,7 @@

#include <stdint.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest_assert.h>

@@ -24,7 +24,7 @@
#include <stdint.h>
#include <nffs/nffs.h>
#include <nffs/os.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -23,7 +23,7 @@

#include <stdint.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -23,7 +23,7 @@

#include <stdint.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -23,7 +23,7 @@

#include <stdint.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -24,7 +24,7 @@
#include <stdint.h>
#include <nffs/nffs.h>
#include <nffs/os.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -23,7 +23,7 @@

#include <stdint.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -24,7 +24,7 @@
#include <stdint.h>
#include <stdio.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -23,7 +23,7 @@

#include <stdint.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest_assert.h>

@@ -24,7 +24,7 @@
#include <stdint.h>
#include <stdio.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <nffs/nffs.h>
#include <nffs/os.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -24,7 +24,7 @@
#include <stdint.h>
#include <stdio.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -23,7 +23,7 @@

#include <stdint.h>
#include <stdio.h>
#include <fs.h>
#include <fs/fs.h>
#include <nffs/nffs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
@@ -13,7 +13,7 @@
#include <stdint.h>
#include <stdio.h>
#include <device.h>
#include <fs.h>
#include <fs/fs.h>
#include <ztest.h>
#include <ztest_assert.h>
#include "nffs_test_utils.h"
@@ -6,7 +6,7 @@

#include <zephyr.h>
#include <ztest.h>
#include <fs.h>
#include <fs/fs.h>

void test_fs_mount(void);
void test_mkdir(void);
@@ -24,7 +24,7 @@
#include <stdint.h>
#include <stdio.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>
@@ -24,7 +24,7 @@
#include <stdint.h>
#include <stdio.h>
#include <nffs/nffs.h>
#include <fs.h>
#include <fs/fs.h>
#include "nffs_test_utils.h"
#include <ztest.h>
#include <ztest_assert.h>

0 comments on commit 656f4df

Please sign in to comment.
You can’t perform that action at this time.