1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 23:15:08 +00:00

Kernel: Make FileSystem::initialize() return KResult

This forced me to also come up with error codes for a bunch of
situations where we'd previously just panic the kernel.
This commit is contained in:
Andreas Kling 2021-08-14 14:02:47 +02:00
parent 46b93174fc
commit d30d776ca4
21 changed files with 61 additions and 58 deletions

View file

@ -202,18 +202,15 @@ ISO9660FS::~ISO9660FS()
{
}
bool ISO9660FS::initialize()
KResult ISO9660FS::initialize()
{
if (!BlockBasedFileSystem::initialize())
return false;
// FIXME: Fix the FileSystem::initialize contract to be able to return a
// KResult.
if (parse_volume_set().is_error())
return false;
if (create_root_inode().is_error())
return false;
return true;
if (auto result = BlockBasedFileSystem::initialize(); result.is_error())
return result;
if (auto result = parse_volume_set(); result.is_error())
return result;
if (auto result = create_root_inode(); result.is_error())
return result;
return KSuccess;
}
Inode& ISO9660FS::root_inode()