[Yellowstone] Attempt to read a test file from the system root.

This commit is contained in:
Drew Galbraith 2023-11-02 19:28:27 -07:00
parent 38fb6ca170
commit b6c220a350
5 changed files with 25 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#include <mammoth/debug.h>
#include <mammoth/endpoint_client.h>
#include <mammoth/init.h>
#include <mammoth/memory_region.h>
#include <mammoth/process.h>
#include <zcall.h>
@ -33,6 +34,17 @@ uint64_t main(uint64_t port_cap) {
dbgln("VFS Available.");
auto vfs_client = server->GetVFSClient();
OpenFileRequest request;
request.set_path("/init.txt");
OpenFileResponse response;
check(vfs_client->OpenFile(request, response));
MappedMemoryRegion file =
MappedMemoryRegion::FromCapability(response.memory());
dbgln("addr: %lu, size: %lu", file.vaddr(), file.size());
check(server_thread.Join());
dbgln("Yellowstone Finished Successfully.");
return 0;