[Yellowstone] Move yellowstone yunq to namespace "yellowstone"
This commit is contained in:
parent
f1e09b2ae6
commit
6212aef336
40 changed files with 141 additions and 16 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <mammoth/util/debug.h>
|
||||
|
||||
glcr::ErrorOr<glcr::SharedPtr<Ext2BlockReader>> Ext2BlockReader::Init(
|
||||
const DenaliInfo& denali_info) {
|
||||
const yellowstone::DenaliInfo& denali_info) {
|
||||
// Read 1024 bytes from 1024 offset.
|
||||
// FIXME: Don't assume 512 byte sectors somehow.
|
||||
DenaliClient client(denali_info.denali_endpoint());
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
class Ext2BlockReader {
|
||||
public:
|
||||
static glcr::ErrorOr<glcr::SharedPtr<Ext2BlockReader>> Init(
|
||||
const DenaliInfo& denali_info);
|
||||
const yellowstone::DenaliInfo& denali_info);
|
||||
|
||||
// TODO: Consider creating a new class wrapper with these computations.
|
||||
Superblock* GetSuperblock();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
#include <glacier/string/string.h>
|
||||
#include <mammoth/util/debug.h>
|
||||
|
||||
glcr::ErrorOr<Ext2Driver> Ext2Driver::Init(const DenaliInfo& denali_info) {
|
||||
glcr::ErrorOr<Ext2Driver> Ext2Driver::Init(
|
||||
const yellowstone::DenaliInfo& denali_info) {
|
||||
ASSIGN_OR_RETURN(glcr::SharedPtr<Ext2BlockReader> reader,
|
||||
Ext2BlockReader::Init(glcr::Move(denali_info)));
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
class Ext2Driver {
|
||||
public:
|
||||
static glcr::ErrorOr<Ext2Driver> Init(const DenaliInfo& denali_info);
|
||||
static glcr::ErrorOr<Ext2Driver> Init(
|
||||
const yellowstone::DenaliInfo& denali_info);
|
||||
|
||||
glcr::ErrorCode ProbePartition();
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
VFSClient::~VFSClient() {
|
||||
if (endpoint_ != 0) {
|
||||
check(ZCapRelease(endpoint_));
|
||||
|
|
@ -93,3 +94,5 @@ glcr::ErrorCode VFSClient::GetDirectory(const GetDirectoryRequest& request, Dire
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "victoriafalls.yunq.h"
|
||||
|
||||
|
||||
class VFSClient {
|
||||
public:
|
||||
VFSClient(z_cap_t VFS_cap) : endpoint_(VFS_cap) {}
|
||||
|
|
@ -33,3 +34,4 @@ class VFSClient {
|
|||
uint64_t kCapBufferSize = 0x10;
|
||||
glcr::CapBuffer cap_buffer_{kCapBufferSize};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// Generated file -- DO NOT MODIFY.
|
||||
#include "victoriafalls.yunq.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
const uint64_t header_size = 24; // 4x uint32, 1x uint64
|
||||
|
|
@ -283,4 +284,5 @@ uint64_t Directory::SerializeToBytes(glcr::ByteBuffer& bytes, uint64_t offset, g
|
|||
WriteHeader(bytes, offset, core_size, next_extension);
|
||||
|
||||
return next_extension;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <glacier/container/vector.h>
|
||||
#include <glacier/string/string.h>
|
||||
#include <ztypes.h>
|
||||
|
||||
|
||||
class OpenFileRequest {
|
||||
public:
|
||||
OpenFileRequest() {}
|
||||
|
|
@ -91,4 +93,5 @@ class Directory {
|
|||
|
||||
// Parses everything except for caps.
|
||||
void ParseFromBytesInternal(const glcr::ByteBuffer&, uint64_t offset);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <mammoth/util/debug.h>
|
||||
#include <zcall.h>
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
const uint32_t kSentinel = 0xBEEFDEAD;
|
||||
|
|
@ -144,3 +145,5 @@ glcr::ErrorCode VFSServerBase::HandleRequest(const glcr::ByteBuffer& request,
|
|||
}
|
||||
return glcr::OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
class VFSServerBase {
|
||||
public:
|
||||
VFSServerBase(z_cap_t VFS_cap) : endpoint_(VFS_cap) {}
|
||||
|
|
@ -43,3 +45,5 @@ class VFSServerBase {
|
|||
glcr::CapBuffer& resp_caps);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
#include "fs/ext2/ext2_driver.h"
|
||||
#include "victoriafalls_server.h"
|
||||
|
||||
using yellowstone::DenaliInfo;
|
||||
using yellowstone::RegisterEndpointRequest;
|
||||
using yellowstone::YellowstoneClient;
|
||||
|
||||
uint64_t main(uint64_t init_cap) {
|
||||
ParseInitPort(init_cap);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue