menu "FileSystem"

config OS_USING_VFS
    bool "Enable virtual file system"
    select OS_USING_MUTEX
    default y
    help
        The device file system is a light weight virtual file system.

if OS_USING_VFS
    config VFS_USING_WORKDIR
        bool "Using working directory"
        default y

    config VFS_FILESYSTEMS_MAX
        int "The max number of mounted file system"
        default 4 if OS_USING_VFS_NFS
        default 2

    config VFS_FILESYSTEM_TYPES_MAX
        int "The max number of file system type"
        default 4 if OS_USING_VFS_NFS
        default 2

    config VFS_FD_MAX
        int "The max number of opened files"
        default 16
		
    config OS_USING_VFS_JFFS2
        bool "Enable JFFS2"
        select OS_USING_FAL
        default n
        help
            JFFS2 is journalling flash file system version2.

    config OS_USING_VFS_FATFS
        bool "Enable FatFs"
        select OS_USING_FAL
        default n
        help
            FatFs is a generic FAT/exFAT file system module for small embedded systems.

    if OS_USING_VFS_FATFS
        menu "Elm-ChaN's FatFs, generic FAT filesystem module"
        config OS_VFS_FAT_CODE_PAGE
            int "OEM code page"
            default 437

        choice
            prompt "Support long file name"
            default OS_VFS_FAT_USE_LFN_3

            config OS_VFS_FAT_USE_LFN_0
                bool "0: LFN disable"

            config OS_VFS_FAT_USE_LFN_1
                bool "1: LFN with static LFN working buffer"

            config OS_VFS_FAT_USE_LFN_2
                bool "2: LFN with dynamic LFN working buffer on the stack"

            config OS_VFS_FAT_USE_LFN_3
                bool "3: LFN with dynamic LFN working buffer on the heap"
        endchoice

        config OS_VFS_FAT_USE_LFN
            int
            default 0 if OS_VFS_FAT_USE_LFN_0
            default 1 if OS_VFS_FAT_USE_LFN_1
            default 2 if OS_VFS_FAT_USE_LFN_2
            default 3 if OS_VFS_FAT_USE_LFN_3

        config OS_VFS_FAT_MAX_LFN
            int "Maximal size of file name length"
            range 12 255
            default 255

        config OS_VFS_FAT_DRIVES
            int "Number of volumes (logical drives) to be used."
            default 2

        config OS_VFS_FAT_MAX_SECTOR_SIZE
            int "Maximum sector size to be handled."
            default 4096
            help
                if you use some spi nor flash for fatfs, please set this the erase sector size, for example 4096.

        config OS_VFS_FAT_REENTRANT
            bool "Enable the reentrancy (thread safe) of the FatFs module"
            default y
        endmenu
    endif

    config OS_USING_VFS_DEVFS
        bool "Enable DevFs for device objects"
        default y

    config OS_USING_VFS_CUTEFS
        bool "Enable CuteFs file system"
        select OS_USING_RAMDISK
        default n
        help
            cutefs is a cute filesystem, now only support run on ramdisk.

    config OS_USING_VFS_NFS
        bool "Enable NFS v3 client file system"
        default n

    if OS_USING_VFS_NFS
        config OS_NFS_HOST_EXPORT
            string "NFSv3 host export"
            default "192.168.1.3:/"
    endif

    config OS_USING_VFS_YAFFS
        bool "Enable Yaffs2 file system"
        default n

endif

endmenu
