Iros
 
Loading...
Searching...
No Matches
initrd.h
Go to the documentation of this file.
1#pragma once
2
3#include "di/util/prelude.h"
4
5namespace iris::initrd {
6using UUID = di::UUID;
7
8constexpr inline auto signature = "b2bf882c-c789-4728-b4a0-b3b944078e29"_uuid;
9constexpr inline auto block_size = 4096_usize;
10constexpr inline auto directory_entry_align = 8_usize;
11
12// NOTE: keep this in sync with the iris::MetadataType enum.
13enum class Type : u8 {
16};
17
24
25 auto name() const -> di::TransparentStringView {
26 return di::TransparentStringView { reinterpret_cast<char const*>(this + 1), name_length };
27 }
28};
29
38}
Definition uuid.h:18
string::StringViewImpl< string::TransparentEncoding > TransparentStringView
Definition string_view.h:13
__UINT64_TYPE__ u64
Definition integers.h:12
__UINT8_TYPE__ u8
Definition integers.h:9
__UINT32_TYPE__ u32
Definition integers.h:11
__UINT16_TYPE__ u16
Definition integers.h:10
Definition zstring_parser.h:9
Definition initrd.h:5
constexpr auto signature
Definition initrd.h:8
constexpr auto block_size
Definition initrd.h:9
di::UUID UUID
Definition initrd.h:6
Type
Definition initrd.h:13
@ Regular
Definition initrd.h:14
@ Directory
Definition initrd.h:15
constexpr auto directory_entry_align
Definition initrd.h:10
Definition initrd.h:18
u32 byte_size
Definition initrd.h:20
u32 block_offset
Definition initrd.h:19
auto name() const -> di::TransparentStringView
Definition initrd.h:25
u8 name_length
Definition initrd.h:23
u16 next_entry
Definition initrd.h:21
Type type
Definition initrd.h:22
Definition initrd.h:30
u32 total_size
Definition initrd.h:35
UUID signature
Definition initrd.h:31
u32 version
Definition initrd.h:34
u64 created_at_seconds_since_epoch
Definition initrd.h:33
DirectoryEntry root_directory
Definition initrd.h:36
UUID generation
Definition initrd.h:32