The VFS component implements the virtual file system. In the KasperskyOS SDK, the VFS component consists of a set of executable files, libraries, formal specification files and header files that enable the use of file systems and/or a network stack.
VFS libraries
The vfs CMake package contains the following libraries:
vfs::lib_fs contains implementations of the devfs, ramfs and ROMFS file systems, and adds implementations of other file systems to VFS.vfs::lib_fs contains the implementation of the devfs file system and the network stack.vfs::client is the client transport library that converts local calls into IPC requests to VFS and receives IPC responses.vfs::server is the VFS server transport library that receives IPC requests, converts them into local calls, and sends IPC responses.vfs::local is used to include VFS functionality in a program.vfs::relay is used to implement the VFS relay mechanism.VFS executable files
The precompiled_vfs CMake package contains the following executable files:
VfsRamFsVfsSdCardFsVfsNetThe VfsRamFs and VfsSdCardFs executable files include the vfs::server, vfs::lib_fs, fs::vfat, and fs::lwext4 libraries. The VfsNet executable file includes the vfs::server and vfs::lib_net libraries.
Each of these executable files has its own default values for startup parameters and environment variables.
If necessary, you can independently build a VFS executable file with the necessary functionality.
Formal specification files and header files of VFS
The sysroot-*-kos/include/kl directory from the KasperskyOS SDK contains the following VFS files:
VfsRamFs.edl, VfsSdCardFs.edl, VfsNet.edl and VfsEntity.edl, and the header files generated from them.Vfs.cdl and the header file Vfs.cdl.h generated from it.Vfs*.idl and the header files generated from them.Libc library API supported by VFS
VFS functionality is available to programs through the API provided by the libc library.
The functions implemented by the vfs::lib_fs and vfs::lib_net libraries are shown in the tables below. The * character denotes the functions that are optionally included in the vfs::lib_fs library (depending on the library build parameters).
Functions implemented by the vfs::lib_fs library
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Functions implemented by the vfs::lib_net library
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If there is no implementation of a called function in VFS, the EIO error code is returned.