mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
vfs: fix empty-node handling in inline fs
Now <inline></inline> as well as <inline/> are supported.
This commit is contained in:
parent
4d34f9f9f4
commit
45f3ccc42a
@ -249,7 +249,7 @@ Libc::File_descriptor *Libc::Vfs_plugin::open(char const *path, int flags,
|
||||
|
||||
Vfs::Vfs_handle *handle = 0;
|
||||
|
||||
while (handle == 0) {
|
||||
while (handle == nullptr) {
|
||||
|
||||
switch (VFS_THREAD_SAFE(_root_dir.open(path, flags, &handle, _alloc))) {
|
||||
|
||||
|
@ -120,6 +120,13 @@ class Vfs::Inline_file_system : public Single_file_system
|
||||
if (!_single_file(path))
|
||||
return OPEN_ERR_UNACCESSIBLE;
|
||||
|
||||
/* empty node */
|
||||
if (_node.content_size() == 0) {
|
||||
*out_handle = new (alloc)
|
||||
Inline_vfs_handle(*this, *this, alloc, nullptr, 0);
|
||||
return OPEN_OK;
|
||||
}
|
||||
|
||||
try {
|
||||
_node.with_raw_content([&] (char const *base, Genode::size_t size) {
|
||||
*out_handle = new (alloc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user