vfs: fix formatting in fs_file_system.h

This commit is contained in:
Norman Feske
2018-08-21 14:02:49 +02:00
committed by Christian Helmuth
parent 3c1ea3667d
commit 89d0d648ed

View File

@ -566,15 +566,8 @@ class Vfs::Fs_file_system : public File_system
Handle_space::Id const id(packet.handle()); Handle_space::Id const id(packet.handle());
try { auto handle_read = [&] (Fs_vfs_handle &handle) {
if (packet.operation() == Packet_descriptor::CONTENT_CHANGED) {
_watch_handle_space.apply<Fs_vfs_watch_handle>(id, [&] (Fs_vfs_watch_handle &handle) {
if (auto *ctx = handle.context())
_post_signal_hook.arm_watch_event(*ctx);
});
} else _handle_space.apply<Fs_vfs_handle>(id, [&] (Fs_vfs_handle &handle)
{
if (!packet.succeeded()) if (!packet.succeeded())
Genode::error("packet operation=", (int)packet.operation(), " failed"); Genode::error("packet operation=", (int)packet.operation(), " failed");
@ -596,7 +589,6 @@ class Vfs::Fs_file_system : public File_system
* 'alloc_packet()' * 'alloc_packet()'
*/ */
_post_signal_hook.arm_io_event(nullptr); _post_signal_hook.arm_io_event(nullptr);
break; break;
case Packet_descriptor::SYNC: case Packet_descriptor::SYNC:
@ -609,8 +601,18 @@ class Vfs::Fs_file_system : public File_system
/* previously handled */ /* previously handled */
break; break;
} }
}); };
} catch (Handle_space::Unknown_id) {
try {
if (packet.operation() == Packet_descriptor::CONTENT_CHANGED) {
_watch_handle_space.apply<Fs_vfs_watch_handle>(id, [&] (Fs_vfs_watch_handle &handle) {
if (auto *ctx = handle.context())
_post_signal_hook.arm_watch_event(*ctx); });
} else {
_handle_space.apply<Fs_vfs_handle>(id, handle_read);
}
}
catch (Handle_space::Unknown_id) {
Genode::warning("ack for unknown VFS handle"); } Genode::warning("ack for unknown VFS handle"); }
if (packet.operation() == Packet_descriptor::WRITE) { if (packet.operation() == Packet_descriptor::WRITE) {