diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-08 21:13:11 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-08 21:14:33 +0200 |
| commit | 9be360bd9cce8a28fb4626fcc47b31b169e3b47c (patch) | |
| tree | ed4db4592826d91c2fac7ecc5e24a5f99763ce90 /Private/Source/FS | |
| parent | 79886caeb4bf17b01fcc42c0891a61bcd5863a75 (diff) | |
Kernel: Don't forget to set drives inside DriveManager.
Kernel: Start implement Format method for NewFS, it needs to verify the
disk first.
Kernel: Add kErrorDiskIsCorrupted (Error 54).
Kernel: Add __NEWOS_AMD64__ and __NEWOS_PPC__.
Kernel: Rename builtin RJ45 to IEE802
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/Source/FS')
| -rw-r--r-- | Private/Source/FS/NewFS.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Private/Source/FS/NewFS.cxx b/Private/Source/FS/NewFS.cxx index 012cb3d2..1d7d3621 100644 --- a/Private/Source/FS/NewFS.cxx +++ b/Private/Source/FS/NewFS.cxx @@ -151,7 +151,18 @@ _Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name, /// @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; } +bool NewFSParser::Format(_Input _Output DriveTrait* drive) { + /// verify disk. + drive->fVerify(&drive->fPacket); + + /// if disk isn't good, then error out. + if (false == drive->fPacket.fPacketGood) { + DbgLastError() = kErrorDiskIsCorrupted; + return false; + } + + return true; +} /// @brief /// @param catalog |
