diff options
| -rw-r--r-- | Private/FSKit/NewFS.hxx | 84 | ||||
| -rw-r--r-- | Private/NewBoot/Source/makefile | 1 | ||||
| -rw-r--r-- | Private/Root/Boot/kernel-logo.ico | bin | 150570 -> 150570 bytes | |||
| -rw-r--r-- | Private/Root/Boot/kernel-logo.svg | 10 | ||||
| -rw-r--r-- | Private/Source/FS/NewFS.cxx | 60 |
5 files changed, 100 insertions, 55 deletions
diff --git a/Private/FSKit/NewFS.hxx b/Private/FSKit/NewFS.hxx index 3d5071c5..3f93700f 100644 --- a/Private/FSKit/NewFS.hxx +++ b/Private/FSKit/NewFS.hxx @@ -9,7 +9,8 @@ ?/?/?: Added file (amlel) 12/02/24: Add UUID macro for EPM and GPT partition schemes. - 3/16/24: Add mandatory sector size, kNewFSMinimumSectorSz is set to 2048 by default. + 3/16/24: Add mandatory sector size, kNewFSMinimumSectorSz is set to 2048 by +default. ------------------------------------------- */ @@ -39,10 +40,10 @@ #define kNewFSUUID "@{DD997393-9CCE-4288-A8D5-C0FDE3908DBE}" #define kNewFSVersionInteger 0x122 -#define kNewFSVerionString "1.2.2" +#define kNewFSVerionString "1.2.2" /// @brief Standard fork types. -#define kNewFSDataFork "data" +#define kNewFSDataFork "data" #define kNewFSResourceFork "rsrc" #define kNewFSCatalogKindFile 1 @@ -117,7 +118,7 @@ struct PACKED NewCatalog final { /// @brief Fork type. struct PACKED NewFork final { - NewCharType Name[kNewFSNodeNameLen]; + NewCharType Name[kNewFSNodeNameLen]; NewOS::Int32 Flags; NewOS::Int32 Kind; @@ -126,7 +127,7 @@ struct PACKED NewFork final { NewOS::Int32 ResourceKind; NewOS::Int32 ResourceFlags; - NewOS::Lba DataOffset; //8 Where to look for this data? + NewOS::Lba DataOffset; // 8 Where to look for this data? NewOS::SizeT DataSize; /// Data size according using sector count. NewOS::Lba NextSibling; @@ -166,11 +167,10 @@ enum { kNewFSSubDriveCount, }; - /// /// \name NewFSParser -/// \brief NewFS parser class. (catalog creation, remove removal, root, forks...) -/// Designed like the DOM, detects the filesystem automatically. +/// \brief NewFS parser class. (catalog creation, remove removal, root, +/// forks...) Designed like the DOM, detects the filesystem automatically. /// class NewFSParser final { @@ -186,42 +186,36 @@ class NewFSParser final { /// @param catalog it's catalog /// @param theFork the fork itself. /// @return the fork - _Output NewFork* CreateFork(_Input NewCatalog* catalog, _Input NewFork& theFork); - + _Output NewFork* CreateFork(_Input NewCatalog* catalog, + _Input NewFork& theFork); + /// @brief Find fork inside New filesystem. /// @param catalog the catalog. /// @param name the fork name. /// @return the fork. - _Output NewFork* FindFork(_Input NewCatalog* catalog, _Input const Char* name); - - virtual _Output Void RemoveFork(_Input NewFork* fork) = 0; - - virtual _Output Void CloseFork(_Input NewFork* fork) = 0; - - virtual _Output NewCatalog* FindCatalog(const char* catalogName) = 0; + _Output NewFork* FindFork(_Input NewCatalog* catalog, + _Input const Char* name); - virtual _Output NewCatalog* RootCatalog() = 0; + virtual _Output Void RemoveFork(_Input NewFork* fork) = 0; - virtual _Output NewCatalog* NextCatalog(_Input _Output NewCatalog* cur) = 0; + virtual _Output Void CloseFork(_Input NewFork* fork) = 0; - virtual _Output NewCatalog* PrevCatalog(_Input _Output NewCatalog* cur) = 0; + virtual _Output NewCatalog* FindCatalog(_Input const char* catalogName) = 0; virtual _Output NewCatalog* GetCatalog(_Input const char* name) = 0; virtual _Output NewCatalog* CreateCatalog(_Input const char* name, - _Input const Int32& flags, - _Input const Int32& kind) = 0; + _Input const Int32& flags, + _Input const Int32& kind); - virtual _Output NewCatalog* CreateCatalog(_Input const char* name) = 0; + virtual _Output NewCatalog* CreateCatalog(_Input const char* name); + + virtual bool WriteCatalog(_Input _Output NewCatalog* catalog, voidPtr data); - virtual bool WriteCatalog(_Input _Output NewCatalog* catalog, - voidPtr data) = 0; - virtual VoidPtr ReadCatalog(_Input _Output NewCatalog* catalog, - SizeT dataSz) = 0; - - virtual bool Seek(_Input _Output NewCatalog* catalog, - SizeT off) = 0; + SizeT dataSz) = 0; + + virtual bool Seek(_Input _Output NewCatalog* catalog, SizeT off) = 0; virtual SizeT Tell(_Input _Output NewCatalog* catalog) = 0; @@ -234,9 +228,8 @@ class NewFSParser final { /// @return If it was sucessful, see DbgLastError(). bool Format(_Input _Output DriveTrait* drive); -public: - Int32 fDriveIndex{ kNewFSSubDriveA }; - + public: + Int32 fDriveIndex{kNewFSSubDriveA}; }; /// @@ -251,22 +244,23 @@ class NewFilesystemHelper final { static const char Separator(); }; +namespace Detail { +Boolean fs_init_newfs(Void) noexcept; +} // namespace Detail +} // namespace NewOS + /// @brief Write to newfs disk. -/// @param Mnt mounted interface. -/// @param DrvTrait drive info +/// @param Mnt mounted interface. +/// @param DrvTrait drive info /// @param DrvIndex drive index. -/// @return -Int32 fs_newfs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex); +/// @return +NewOS::Int32 fs_newfs_write(NewOS::MountpointInterface* Mnt, + NewOS::DriveTrait& DrvTrait, NewOS::Int32 DrvIndex); /// @brief Read from newfs disk. /// @param Mnt mounted interface. /// @param DrvTrait drive info /// @param DrvIndex drive index. -/// @return -Int32 fs_newfs_read(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex); - -namespace Detail -{ -Boolean fs_init_newfs(Void) noexcept; -} // namespace Detail -} // namespace NewOS +/// @return +NewOS::Int32 fs_newfs_read(NewOS::MountpointInterface* Mnt, + NewOS::DriveTrait& DrvTrait, NewOS::Int32 DrvIndex); diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index 595010d3..8d7f3cb9 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -40,6 +40,7 @@ all: compile-amd64 $(LD_GNU) $(OBJ) $(LD_FLAGS) -o NewBoot.exe $(COPY) NewBoot.exe CDROM/EFI/BOOT/BOOTX64.EFI $(COPY) NewBoot.exe CDROM/EFI/BOOT/NEWBOOT.EFI + $(COPY) NewBoot.exe ../../Root/Boot/NewBoot.exe $(COPY) ../../Root/Boot/NewKernel.exe CDROM/ ifneq ($(DEBUG_SUPPORT), ) diff --git a/Private/Root/Boot/kernel-logo.ico b/Private/Root/Boot/kernel-logo.ico Binary files differindex 945049b9..683c2137 100644 --- a/Private/Root/Boot/kernel-logo.ico +++ b/Private/Root/Boot/kernel-logo.ico diff --git a/Private/Root/Boot/kernel-logo.svg b/Private/Root/Boot/kernel-logo.svg deleted file mode 100644 index 751ec02c..00000000 --- a/Private/Root/Boot/kernel-logo.svg +++ /dev/null @@ -1,10 +0,0 @@ -<svg width="61" height="61" viewBox="0 0 61 61" fill="none" xmlns="http://www.w3.org/2000/svg"> -<rect x="0.5" y="0.5" width="60" height="60" rx="9.5" fill="#302929" fill-opacity="0.7" stroke="#323232"/> -<circle cx="31" cy="30" r="14.5" fill="url(#paint0_radial_0_1)" stroke="#323232"/> -<defs> -<radialGradient id="paint0_radial_0_1" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(31 30) rotate(90) scale(15)"> -<stop stop-color="#820F0F"/> -<stop offset="1" stop-color="#FF0000" stop-opacity="0.52"/> -</radialGradient> -</defs> -</svg> diff --git a/Private/Source/FS/NewFS.cxx b/Private/Source/FS/NewFS.cxx index 3c33f441..ac38400a 100644 --- a/Private/Source/FS/NewFS.cxx +++ b/Private/Source/FS/NewFS.cxx @@ -129,13 +129,73 @@ _Output NewFork* NewFSParser::FindFork(_Input NewCatalog* catalog, return theFork; } +/// @brief Simpler factory to create a catalog (assumes you want to create a +/// file.) +/// @param name +/// @return +_Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name) { + return this->CreateCatalog(name, 0, kNewFSCatalogKindFile); +} + +/// @brief +/// @param name +/// @param flags +/// @param kind +/// @return +_Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name, + _Input const Int32& flags, + _Input const Int32& kind) { + return nullptr; +} + /// @brief Make a EPM+NewFS drive out of the disk. /// @param drive The drive to write on. /// @return If it was sucessful, see DbgLastError(). bool NewFSParser::Format(_Input _Output DriveTrait* drive) { return false; } +/// @brief +/// @param catalog +/// @param data +/// @return +bool NewFSParser::WriteCatalog(_Input _Output NewCatalog* catalog, + voidPtr data) { + return false; +} + +_Output NewCatalog* NewFSParser::FindCatalog(_Input const char* catalogName) { + return nullptr; +} + +_Output NewCatalog* NewFSParser::GetCatalog(_Input const char* name) { + return nullptr; +} + +Boolean NewFSParser::CloseCatalog(_Input _Output NewCatalog* catalog) { + return false; +} + +Boolean NewFSParser::RemoveCatalog(_Input _Output NewCatalog* catalog) { + return false; +} + + +VoidPtr NewFSParser::ReadCatalog(_Input _Output NewCatalog* catalog, + SizeT dataSz) { + return nullptr; +} + +bool NewFSParser::Seek(_Input _Output NewCatalog* catalog, SizeT off) { + return false; +} + +SizeT NewFSParser::Tell(_Input _Output NewCatalog* catalog) { return 0; } + STATIC Lba ke_find_free_fork(SizeT sz) { return 0; } STATIC Lba ke_find_free_catalog(SizeT sz) { return 0; } STATIC Lba ke_find_free_data(SizeT sz) { return 0; } +namespace NewOS::Detail { +Boolean fs_init_newfs(Void) noexcept { return false; } +} // namespace NewOS::Detail + #endif // ifdef __FSKIT_NEWFS__
\ No newline at end of file |
