hos/vfs.h

35 lines
602 B
C

// vfs.h
// Author: Josh Holtrop
// Created: 12/31/03
#define VFS_DISK_RD 1
#define VFS_DISK_FD 2
#define VFS_DISK_HD 3
#define VFS_FS_FAT12 1
typedef struct {
dword type;
dword fileSystem;
char id[4];
dword location;
} __attribute__((packed)) DiskDevice;
typedef struct {
DiskDevice *diskDevice;
dword link;
} __attribute__((packed)) DeviceEntry;
void vfs_init();
byte *vfs_readFile(char *fileName);
byte *vfs_readSector(DiskDevice *dd, dword sector);
DiskDevice *vfs_getDiskDeviceByID(char *id);
char rootDirectory[4];
DeviceEntry *firstDevice = 0;