summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/FS
diff options
context:
space:
mode:
Diffstat (limited to 'Private/Source/FS')
-rw-r--r--Private/Source/FS/NewFS.cxx13
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