mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:08:12 +00:00
Kernel: Propagate Vector append errors in two places in Ext2FS
There are a bunch more of these, just taking care of some simple ones.
This commit is contained in:
parent
5ce753b74d
commit
4661ca5f15
1 changed files with 2 additions and 2 deletions
|
@ -1169,7 +1169,7 @@ ErrorOr<void> Ext2FSInode::add_child(Inode& child, const StringView& name, mode_
|
||||||
TRY(traverse_as_directory([&](auto& entry) -> ErrorOr<void> {
|
TRY(traverse_as_directory([&](auto& entry) -> ErrorOr<void> {
|
||||||
if (name == entry.name)
|
if (name == entry.name)
|
||||||
return EEXIST;
|
return EEXIST;
|
||||||
entries.append({ entry.name, entry.inode.index(), entry.file_type });
|
TRY(entries.try_append({ entry.name, entry.inode.index(), entry.file_type }));
|
||||||
return {};
|
return {};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -1203,7 +1203,7 @@ ErrorOr<void> Ext2FSInode::remove_child(const StringView& name)
|
||||||
Vector<Ext2FSDirectoryEntry> entries;
|
Vector<Ext2FSDirectoryEntry> entries;
|
||||||
TRY(traverse_as_directory([&](auto& entry) -> ErrorOr<void> {
|
TRY(traverse_as_directory([&](auto& entry) -> ErrorOr<void> {
|
||||||
if (name != entry.name)
|
if (name != entry.name)
|
||||||
entries.append({ entry.name, entry.inode.index(), entry.file_type });
|
TRY(entries.try_append({ entry.name, entry.inode.index(), entry.file_type }));
|
||||||
return {};
|
return {};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue