Go to the documentation of this file.
18 #include <FreeNOS/User.h>
23 const char *symbolName)
24 : m_bootImage(bootImage)
25 , m_symbol(loadSymbol(symbolName))
26 , m_segment(loadSegment(m_symbol))
54 const String symbolName(name);
68 ERROR(
"failed to read BootSymbol: result = " << (
int) result);
101 ERROR(
"failed to read BootSegment: result = " << (
int) result);
const BootSegment m_segment
BootSegment value.
static void * set(void *dest, int ch, unsigned count)
Fill memory with a constant byte.
virtual FileSystem::Result read(const u64 offset, void *buffer, const Size size) const
Reads data from the boot image.
Uses a BootImage as a storage provider.
u32 segmentsOffset
Offset in the segments table.
const BootImage bootImage() const
Get BootImage header.
char name[BOOTIMAGE_NAMELEN]
Name of the boot symbol.
const BootImageStorage & m_bootImage
Read-only reference to the BootImage storage.
unsigned int uint
Unsigned integer number.
unsigned long long u64
Unsigned 64-bit number.
BootSymbolStorage(const BootImageStorage &bootImage, const char *symbolName)
Constructor function.
u32 segmentsTableOffset
Offset of the segments table.
u32 segmentsTotalSize
Total size of the BootSymbol segments.
u16 symbolTableCount
Number of entries in the symbols table.
virtual u64 capacity() const
Retrieve maximum storage capacity.
unsigned int Size
Any sane size indicator cannot go negative.
virtual FileSystem::Result initialize()
Initialize the Storage device.
Program embedded in the BootImage.
#define ERROR(msg)
Output an error message.
Result
Result code for filesystem Actions.
u32 symbolTableOffset
Offset of the symbol table.
BootImage contains executable programs to be loaded at system bootup.
const BootSymbol m_symbol
BootSymbol value.
const BootSymbol loadSymbol(const char *name) const
Loads the BootSymbol from the BootImage.
u32 offset
Offset in the boot image of the segment contents.
virtual bool equals(const String &str) const
Alias for compareTo().
virtual FileSystem::Result read(const u64 offset, void *buffer, const Size size) const
Reads data from the BootSymbol.
const BootSegment loadSegment(const BootSymbol &symbol) const
Load the BootSegment for the given BootSymbol.