mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 20:29:42 +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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user