Shellscript improvement plus FAT driver implementations
- Improved the run bash script to exit when an error occurs in one of the sub tasks - Wrote basic FAT16 functions that should give enough information to properly implement the rest of the driver - FAT structure namings are now in accordence with the microsoft spec of March 2005
This commit is contained in:
@ -1,20 +1,32 @@
|
||||
#pragma once
|
||||
#include <stdint-gcc.h>
|
||||
#include "../../../CoreLib/Path.h"
|
||||
#include "StorageTypes.h"
|
||||
#include "vfs_types.h"
|
||||
#include "vfs_types.h"
|
||||
class VirtualFileSystem
|
||||
{
|
||||
public:
|
||||
static void initialize();
|
||||
static void Mount(PFS fs, unsigned int DeviceID);
|
||||
static void Unmount(unsigned int DeviceID);
|
||||
static FILE OpenFile(const char* path);
|
||||
static void RegisterPartition(PTR_PARTITION partition);
|
||||
static void Mount(filesystem* fs, const char* name);
|
||||
|
||||
static int register_filesystem(struct filesystem* fs);
|
||||
|
||||
static struct file* open(const char* pathname, int flags);
|
||||
static int close(struct file* file);
|
||||
static int write(struct file* file, const void* buf, size_t len);
|
||||
static int read(struct file* file, void* buf, size_t len);
|
||||
|
||||
private:
|
||||
static const unsigned int DEVICE_MAX = 26;
|
||||
static const unsigned int PARTITION_MAX = 4 * DEVICE_MAX;
|
||||
static PFS _filesystems[DEVICE_MAX];
|
||||
static unsigned int num_partitions;
|
||||
static PTR_PARTITION _partitions [PARTITION_MAX];
|
||||
};
|
||||
static vfsmount* rootfs;
|
||||
|
||||
|
||||
static int mount_number;
|
||||
static int superblock_number;
|
||||
static int filesystem_number;
|
||||
|
||||
static filesystem* filesystems[];
|
||||
static superblock* superblocks[];
|
||||
static vfsmount* mounts[];
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user