XenevaOS
Loading...
Searching...
No Matches
devfs.h
Go to the documentation of this file.
1
30#ifndef __DEVFS_H__
31#define __DEVFS_H__
32
33#include <stdint.h>
34#include <aurora.h>
35#include <Fs/vfs.h>
36
37/* Device file system, where all driver registers
38 * their own device node
39 */
40
41
42/*
43* AuDeviceFsInitialize -- initialise the device
44* file system
45*/
46extern void AuDeviceFsInitialize();
47
48/*
49* AuDevFSCreateFile -- create a file/directory
50* @param fs -- pointer to device file system
51* @param path -- path of the file
52* @param mode -- mode of the file either Directory
53* or General device file
54*/
55extern int AuDevFSCreateFile(AuVFSNode* fs, char* path, uint8_t mode);
56
57/*
58* AuDevFSAddFile -- adds a file/directory
59* @param fs -- pointer to device file system
60* @param path -- path of the file
61* @param file -- file to add to dev fs
62*/
64/*
65* AuDevFSOpen -- open a device file and return to the
66* caller
67* @param fs -- file system node
68* @param path -- path of the dev file
69*/
70extern AuVFSNode* AuDevFSOpen(AuVFSNode* fs, char* path);
71
72/* Hold/release a user-visible device node reference. Loadable-driver-backed
73 * nodes also hold one driver reference while at least one fd is open. */
74extern bool AuDevFSNodeOpen(AuVFSNode* node);
75extern void AuDevFSNodeClose(AuVFSNode* node);
76
77/* For debug purpose */
78extern void AuDevFSList(AuVFSNode* fs);
79
80/*
81* AuDevFSRemoveFile -- remove a file from device
82* file system
83* @param fs -- pointer to the file system
84* @param path -- path of the file
85*/
87#endif
#define AU_EXTERN
Definition aurora.h:54
#define AU_EXPORT
Definition aurora.h:40
unsigned char uint8_t
Definition acefiex.h:161
bool AuDevFSNodeOpen(AuVFSNode *node)
Definition devfs.c:287
int AuDevFSCreateFile(AuVFSNode *fs, char *path, uint8_t mode)
Definition devfs.cpp:67
void AuDevFSNodeClose(AuVFSNode *node)
Definition devfs.c:299
void AuDeviceFsInitialize()
Definition devfs.cpp:44
AuVFSNode * AuDevFSOpen(AuVFSNode *fs, char *path)
Definition devfs.cpp:207
void AuDevFSList(AuVFSNode *fs)
Definition devfs.cpp:181
void AuDevFSRemoveFile(void)
void AuDevFSAddFile(void)
void int node
Definition kthread.h:31
Definition vfs.h:129
Definition fs.h:142
Definition path.h:8
#define mode(x)