make compile
This commit is contained in:
parent
42f24e0e78
commit
5d64c62171
30
src/fs.cpp
30
src/fs.cpp
@ -78,21 +78,21 @@ auto Fs::make_directory(u16 parent_inode_id, std::string_view name)
|
|||||||
return make_inode(parent_inode_id, name, INodeType::Dir);
|
return make_inode(parent_inode_id, name, INodeType::Dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Fs::write(u16 inode_id, const void* data, u16 size) -> Result<u16>
|
// auto Fs::write(u16 inode_id, const void* data, u16 size) -> Result<u16>
|
||||||
{
|
// {
|
||||||
auto inode_result = read_inode(inode_id);
|
// auto inode_result = read_inode(inode_id);
|
||||||
if (not inode_result)
|
// if (not inode_result)
|
||||||
return std::unexpected(inode_result.error());
|
// return std::unexpected(inode_result.error());
|
||||||
auto& inode = *inode_result;
|
// auto& inode = *inode_result;
|
||||||
|
//
|
||||||
if (auto result = inode_for_each_block_id(inode,
|
// if (auto result = inode_for_each_block_id(inode,
|
||||||
[&](u16& block_id) {
|
// [&](u16& block_id) {
|
||||||
deallocate_block(block_id);
|
// deallocate_block(block_id);
|
||||||
block_id = 0;
|
// block_id = 0;
|
||||||
});
|
// });
|
||||||
not result)
|
// not result)
|
||||||
return std::unexpected(result.error());
|
// return std::unexpected(result.error());
|
||||||
}
|
// }
|
||||||
|
|
||||||
auto Fs::make_inode(u16 parent_inode_id, std::string_view name, INodeType type)
|
auto Fs::make_inode(u16 parent_inode_id, std::string_view name, INodeType type)
|
||||||
-> Result<u16>
|
-> Result<u16>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user