summaryrefslogtreecommitdiff
path: root/fs/fs.h
blob: 7d51e86a64f5326736e225cab4fc8e86efdfdec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef FOOLOS_FS
#define FOOLOS_FS

#include <stdint.h>
#include "kernel/multiboot.h"

enum FS_FILE_TYPE{
    
    FS_FILE_TYPE_DIR	=	1,
    FS_FILE_TYPE_FILE	=	2
};

typedef struct fs_dirent_struct
{
    uint32_t	inode;
    uint32_t	offset;
    uint16_t	length;
    uint8_t	type;
    char	name[256];
}fs_dirent;

int  fs_readdir(const char *name,fs_dirent *dirs,int max);
void fs_content(char *path, uint32_t dest, uint32_t max_bytes);
void fs_mount(multiboot_information *info);  // mounts ext2 ramimage from module as root

#endif