diff --git a/sys/victoriafalls/CMakeLists.txt b/sys/victoriafalls/CMakeLists.txt index 730daf1..f62b8d4 100644 --- a/sys/victoriafalls/CMakeLists.txt +++ b/sys/victoriafalls/CMakeLists.txt @@ -8,6 +8,7 @@ target_include_directories(victoriafalls target_link_libraries(victoriafalls glacier mammoth + yellowstone_stub ) set_target_properties(victoriafalls PROPERTIES diff --git a/sys/victoriafalls/victoriafalls.cpp b/sys/victoriafalls/victoriafalls.cpp index f368dcd..2e4b87d 100644 --- a/sys/victoriafalls/victoriafalls.cpp +++ b/sys/victoriafalls/victoriafalls.cpp @@ -1,9 +1,28 @@ #include #include +#include + +struct Superblock { + uint32_t inode_count; + uint32_t blocks_count; + uint32_t reserved_blocks_count; + uint32_t free_blocks_count; + uint32_t free_inodes_count; +}; uint64_t main(uint64_t init_cap) { ParseInitPort(init_cap); dbgln("VFs Started"); + + YellowstoneStub yellowstone(gInitEndpointCap); + ASSIGN_OR_RETURN(ScopedDenaliClient denali, yellowstone.GetDenali()); + + ASSIGN_OR_RETURN(MappedMemoryRegion region, denali.ReadSectors(2, 2)); + Superblock* super = reinterpret_cast(region.vaddr()); + + dbgln("Inodes: %x / %x", super->free_inodes_count, super->inode_count); + dbgln("Blocks: %x / %x", super->free_blocks_count, super->blocks_count); + return 0; } diff --git a/sys/yellowstone/yellowstone_server.cpp b/sys/yellowstone/yellowstone_server.cpp index fec3d46..244650c 100644 --- a/sys/yellowstone/yellowstone_server.cpp +++ b/sys/yellowstone/yellowstone_server.cpp @@ -98,6 +98,7 @@ void YellowstoneServer::ServerThread() { }; check(ZReplyPortSend(reply_port_cap, sizeof(resp), &resp, 1, &new_denali)); + break; } default: dbgln("Unknown request type: %x", req->type);