BEEP-8 SDK 1.0.0
Loading...
Searching...
No Matches
crt.h File Reference

Header file for C runtime initialization and system functions. More...

#include <sys/stat.h>
#include <stddef.h>

Go to the source code of this file.

Classes

struct  File
 Represents a file in the file system. More...
 
struct  file_operations
 Represents the operations that can be performed on a file. More...
 
struct  FsDriver
 Represents a file system driver. More...
 

Macros

#define N_MAX_PATH   (32)
 

Functions

int fs_register_driver (const char *path, const file_operations *fops, mode_t mode, void *priv)
 Registers a file system driver.
 
int _ioctl (int fd, unsigned int cmd, void *arg)
 Performs an IOCTL operation on a file.
 

Detailed Description

Header file for C runtime initialization and system functions.

This header file provides declarations for functions and structures used during the C runtime initialization process and other system-level operations. These functions and structures are typically reserved for system use and should not be called directly by user applications.

Function Documentation

◆ _ioctl()

int _ioctl ( int fd,
unsigned int cmd,
void * arg )
extern

Performs an IOCTL operation on a file.

This function performs an IOCTL operation on the specified file descriptor with the given command and argument.

Parameters
fdThe file descriptor.
cmdThe IOCTL command.
argThe argument for the IOCTL command.
Returns
int 0 on success, negative value on failure.

◆ fs_register_driver()

int fs_register_driver ( const char * path,
const file_operations * fops,
mode_t mode,
void * priv )
extern

Registers a file system driver.

This function registers a new file system driver with the specified path, file operations, access mode, and private data.

Parameters
pathThe path managed by the driver.
fopsThe file operations supported by the driver.
modeThe access mode for the driver.
privThe driver-specific private data.
Returns
int 0 on success, negative value on failure.