diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 10:53:58 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 10:53:58 +0100 |
| commit | de4af9d8929da048ab714b75d2af23ccebe3f6cb (patch) | |
| tree | fa9350dc3e0b178904cf5c41691570444d3bc5b2 /Private/NewBoot/Source/MPT/API.cxx | |
| parent | 70e95128b11dbb535e4679cbacb1cbeaa414c822 (diff) | |
Bootloader: Refactor MPT, working on EFI support.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source/MPT/API.cxx')
| -rw-r--r-- | Private/NewBoot/Source/MPT/API.cxx | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/Private/NewBoot/Source/MPT/API.cxx b/Private/NewBoot/Source/MPT/API.cxx deleted file mode 100644 index 8c649024..00000000 --- a/Private/NewBoot/Source/MPT/API.cxx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * ======================================================== - * - * NewBoot - * Copyright 2024 Mahrouss Logic, all rights reserved. - * - * ======================================================== - */ - -#include "API.hxx" -#include "Detail.hxx" - -#define kFilesR 0x01 /* read-only */ -#define kFilesH 0x02 /* hidden */ -#define kFilesS 0x04 /* system */ -#define kFilesL 0x08 /* volume label */ -#define kFilesD 0x10 /* directory */ -#define kFilesZ 0x20 /* archive */ - -// @brief Array of unused bits. -#define kFilesU { 0x40, 0x80 } - -namespace mpt::detail -{ - struct Files32FileHdr final - { - char Filename[32]; - char Ext[3]; - char Attr; - char Case; - char CreateMs; - unsigned short Create; - unsigned short CreateDate; - unsigned short LastAccess; - unsigned short Timestamp; - unsigned short Datestamp; - unsigned short StartLba; - unsigned int SizeFile; - }; - - struct Files32FileGroup final - { - Files32FileHdr* fHdr{ nullptr }; - - Files32FileGroup* fUpper{ nullptr }; - Files32FileGroup* fLower{ nullptr }; - Files32FileGroup* fPrev{ nullptr }; - Files32FileGroup* fNext{ nullptr }; - }; - - /* @brief external inits */ - extern "C" int init_ata_mpt(void); - extern "C" int init_mpt(void); - - Files32FileGroup* kRootGroup = nullptr; -} - -namespace mpt -{ - bool init_mpt() noexcept - { - detail::kRootGroup = detail::new_class<detail::Files32FileGroup>(); - - assert(detail::kRootGroup != nullptr); - assert(detail::init_ata_mpt() == detail::okay); - assert(detail::init_mpt() == detail::okay); - - return true; - } -}
\ No newline at end of file |
