Postmortem debug target now loads/scans the trace and inits the filesystem.

This commit is contained in:
Ben Vanik
2014-08-15 10:19:59 -07:00
parent 4768f2fc0b
commit 3de39aaf10
27 changed files with 541 additions and 255 deletions

View File

@@ -10,6 +10,7 @@
#ifndef XENIA_KERNEL_FS_FILESYSTEM_H_
#define XENIA_KERNEL_FS_FILESYSTEM_H_
#include <string>
#include <unordered_map>
#include <vector>
@@ -18,39 +19,46 @@
#include <xenia/kernel/fs/entry.h>
namespace xe {
namespace kernel {
namespace fs {
class Device;
enum class FileSystemType {
STFS_TITLE,
DISC_IMAGE,
XEX_FILE,
};
class FileSystem {
public:
public:
FileSystem();
~FileSystem();
int RegisterDevice(const char* path, Device* device);
int RegisterHostPathDevice(const char* path, const xechar_t* local_path);
int RegisterDiscImageDevice(const char* path, const xechar_t* local_path);
int RegisterSTFSContainerDevice(const char* path, const xechar_t* local_path);
FileSystemType InferType(const std::wstring& local_path);
int InitializeFromPath(FileSystemType type, const std::wstring& local_path);
int RegisterDevice(const std::string& path, Device* device);
int RegisterHostPathDevice(const std::string& path,
const std::wstring& local_path);
int RegisterDiscImageDevice(const std::string& path,
const std::wstring& local_path);
int RegisterSTFSContainerDevice(const std::string& path,
const std::wstring& local_path);
int CreateSymbolicLink(const char* path, const char* target);
int DeleteSymbolicLink(const char* path);
Entry* ResolvePath(const char* path);
private:
std::vector<Device*> devices_;
private:
std::vector<Device*> devices_;
std::unordered_map<std::string, std::string> symlinks_;
};
} // namespace fs
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_FS_FILESYSTEM_H_