[ox] Add a new oxfs tool

This commit is contained in:
2022-01-28 01:22:37 -06:00
parent df782129bb
commit 2be5b0f6bc
5 changed files with 114 additions and 6 deletions

View File

@ -41,9 +41,9 @@ struct OX_PACKED DirectoryEntry {
LittleEndian<InodeId_t> m_bufferSize = sizeof(DirectoryEntry);
public:
DirectoryEntry() = default;
constexpr DirectoryEntry() noexcept = default;
Error init(InodeId_t inode, const char *name, InodeId_t bufferSize) {
Error init(InodeId_t inode, const char *name, InodeId_t bufferSize) noexcept {
m_bufferSize = bufferSize;
auto d = data();
if (d.valid()) {
@ -54,7 +54,7 @@ struct OX_PACKED DirectoryEntry {
return OxError(1);
}
ptrarith::Ptr<DirectoryEntryData, InodeId_t> data() {
ptrarith::Ptr<DirectoryEntryData, InodeId_t> data() noexcept {
oxTracef("ox::fs::DirectoryEntry::data", "{} {} {}", this->fullSize(), sizeof(*this), this->size());
return ptrarith::Ptr<DirectoryEntryData, InodeId_t>(this, this->fullSize(), sizeof(*this), this->size(), this->size());
}