mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-12 17:30:38 +00:00
Kernel/FATFS: Implement a hacky replace_child
This is not a proper implementation, but it's good enough to get the write support fully working.
This commit is contained in:
parent
511b298a1d
commit
31174c43bf
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/cqundefine Commit: https://github.com/SerenityOS/serenity/commit/31174c43bf Pull-request: https://github.com/SerenityOS/serenity/pull/23907 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/implicitfield Reviewed-by: https://github.com/nico Reviewed-by: https://github.com/timschumi ✅
1 changed files with 5 additions and 3 deletions
|
@ -180,10 +180,12 @@ ErrorOr<NonnullOwnPtr<KBuffer>> FATInode::read_block_list()
|
|||
return blocks.release_nonnull();
|
||||
}
|
||||
|
||||
ErrorOr<void> FATInode::replace_child(StringView, Inode&)
|
||||
ErrorOr<void> FATInode::replace_child(StringView name, Inode& inode)
|
||||
{
|
||||
// TODO: Implement this once we have write support.
|
||||
return Error::from_errno(EROFS);
|
||||
// FIXME: Implement this properly
|
||||
TRY(remove_child(name));
|
||||
TRY(add_child(inode, name, inode.mode()));
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<RefPtr<FATInode>> FATInode::traverse(Function<ErrorOr<bool>(RefPtr<FATInode>)> callback)
|
||||
|
|
Loading…
Reference in a new issue