mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 15:18:20 +00:00
VFS: catch Out_of_ram and Out_of_cap exceptions
Catch out of RAM and capability exceptions and return error values. Abort opening a composite directory at Dir_file_system where an opendir call on any child file-system returns an OUT_OF_RAM or OUT_OF_CAPS error. Ref #2642
This commit is contained in:
committed by
Norman Feske
parent
c34a4bfdb4
commit
c7d0accac0
@ -109,9 +109,13 @@ class Vfs::Rtc_file_system : public Single_file_system
|
||||
if (!_single_file(path))
|
||||
return OPEN_ERR_UNACCESSIBLE;
|
||||
|
||||
*out_handle = new (alloc) Rtc_vfs_handle(*this, *this, alloc,
|
||||
_rtc);
|
||||
return OPEN_OK;
|
||||
try {
|
||||
*out_handle = new (alloc)
|
||||
Rtc_vfs_handle(*this, *this, alloc, _rtc);
|
||||
return OPEN_OK;
|
||||
}
|
||||
catch (Genode::Out_of_ram) { return OPEN_ERR_OUT_OF_RAM; }
|
||||
catch (Genode::Out_of_caps) { return OPEN_ERR_OUT_OF_CAPS; }
|
||||
}
|
||||
|
||||
Stat_result stat(char const *path, Stat &out) override
|
||||
|
Reference in New Issue
Block a user