44 int (*close)(
File* filep);
45 ssize_t (*read)(
File* filep,
char *buffer,
size_t buflen);
46 ssize_t (*write)(
File* filep,
const char *buffer,
size_t buflen);
47 off_t (*seek)(
File* filep,
int ptr,
int dir);
48 int (*
ioctl)(
File* filep,
unsigned int cmd,
void* arg);
51#define N_MAX_PATH (32)
59 char _path[ N_MAX_PATH ];
95extern int _ioctl(
int fd,
unsigned int cmd,
void* arg);
int fs_register_driver(const char *path, const file_operations *fops, mode_t mode, void *priv)
Registers a file system driver.
Definition crt0.c:430
int _ioctl(int fd, unsigned int cmd, void *arg)
Performs an IOCTL operation on a file.
Definition crt0.c:821
int ioctl(int fd, int request,...)
Performs a variety of control functions on devices.
Definition misc.c:6
Represents a file in the file system.
Definition crt.h:28
void * f_priv
File-specific private data.
Definition crt.h:29
uint8_t used
Flag indicating if the file is in use.
Definition crt.h:31
void * d_priv
Driver-specific private data.
Definition crt.h:30
int mode
Access mode for the file.
Definition crt.h:32
Represents a file system driver.
Definition crt.h:58
void * _priv
Driver-specific private data.
Definition crt.h:62
const file_operations * _fops
Supported file operations.
Definition crt.h:60
mode_t _mode
Access mode for the driver.
Definition crt.h:61
Represents the operations that can be performed on a file.
Definition crt.h:42