|
RPV Event driven kernel
|
Kernel filesystem and drive management middleware API extending kernel shell runtime with file mangement commands. More...
Functions | |
| void | _kernel_fio (void) |
| Initializes kernel file I/O subsystem. | |
| char | _kernel_cdrive (void) |
| Retrieves current active drive letter. | |
| bool | _kernel_unmount (void) |
| Unmounts the currently mounted drive. | |
| bool | _kernel_mount (char letter) |
| Mounts a drive by letter. | |
| size_t | _kernel_drives (char *drive_lt, size_t nlt) |
| Retrieves available drive letters. | |
| void | _kernel_cd (char const *path) |
| Changes the current working directory. | |
| void | _kernel_mkdir (char const *path) |
| Creates a new directory. | |
| void | _kernel_rmfile (char const *path) |
| Removes a file. | |
| void | _kernel_ls (const int argc, const char **argv) |
| Lists directory contents. | |
Kernel filesystem and drive management middleware API extending kernel shell runtime with file mangement commands.
| void _kernel_cd | ( | char const * | path | ) |
Changes the current working directory.
| [in] | path | Target directory path. |
Changes the active working directory within the kernel filesystem context.
Behavior on invalid path is implementation-defined (e.g., error message output, silent failure, etc.).
| char _kernel_cdrive | ( | void | ) |
Retrieves current active drive letter.
| 0 | No drive mounted. |
Returns the logical drive identifier (e.g., 'A', 'B', 'C').
| size_t _kernel_drives | ( | char * | drive_lt, |
| size_t | nlt | ||
| ) |
Retrieves available drive letters.
| [out] | drive_lt | Buffer receiving drive letters. |
| [in] | nlt | Maximum number of letters to store. |
Writes up to nlt available drive identifiers into the provided buffer. Letters are not null-terminated unless explicitly handled by the caller.
| void _kernel_fio | ( | void | ) |
Initializes kernel file I/O subsystem.
Prepares internal filesystem structures, mount tables, and underlying block device interfaces.
Must be called before invoking mount, unmount, or drive-related functions.
| void _kernel_ls | ( | const int | argc, |
| const char ** | argv | ||
| ) |
Lists directory contents.
| [in] | argc | Number of arguments. |
| [in] | argv | Argument vector. |
Implements directory listing functionality. Arguments may include:
Intended for invocation from kernel shell.
| void _kernel_mkdir | ( | char const * | path | ) |
Creates a new directory.
| [in] | path | Directory path to create. |
Creates a directory at the specified path.
| bool _kernel_mount | ( | char | letter | ) |
Mounts a drive by letter.
| [in] | letter | Logical drive letter to mount. |
| true | Mount successful. |
| false | Mount failed. |
| void _kernel_rmfile | ( | char const * | path | ) |
Removes a file.
| [in] | path | Path to file to remove. |
Deletes the specified file from the filesystem.
Removal of directories using this function when not empty will result in access denied.
| bool _kernel_unmount | ( | void | ) |
Unmounts the currently mounted drive.
| true | Unmount successful. |
| false | Unmount failed or no drive mounted. |