diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-26 08:26:54 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-26 08:26:54 +0200 |
| commit | 9cf4007cc5a2d37c8a49cbc25a564cde5981e7b0 (patch) | |
| tree | 7106b94b6ff11b93424622402518ddd2034f906b /Private/NewBoot/BootKit | |
| parent | 3b4a4a290b32fdb4a749b3e581afae450eb543c8 (diff) | |
MHR-16: Last fix and improvements.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/BootKit')
| -rw-r--r-- | Private/NewBoot/BootKit/BootKit.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index 6272e4c9..ffa3af15 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -213,6 +213,17 @@ public: /// @retval False failed to format. Boolean Format(const char* partName, BFileDescriptor* fileBlobs, SizeT blobCount); + operator bool() noexcept { + fDiskDev.Leak().mBase = (kNewFSAddressAsLba / BootDev::kSectorSize); + fDiskDev.Leak().mSize = BootDev::kSectorSize; + + Char buf[BootDev::kSectorSize] = { 0 }; + + fDiskDev.Read(buf, BootDev::kSectorSize); + + return buf[0] == kNewFSIdent[0]; + } + private: /// @brief Write all of the requested catalogs into the filesystem. Boolean WriteContent(BFileDescriptor* fileBlobs, SizeT blobCount, |
