Make all refs to the bootboot structure const
This commit is contained in:
parent
54ce511f1d
commit
58ecf11424
@ -37,7 +37,7 @@ static int bcd_number_to_decimal(int num)
|
||||
return ((num >> 4) * 10) + (num & 0xf);
|
||||
}
|
||||
|
||||
static u64 bootloader_time_to_unix(u8 boottime[8])
|
||||
static u64 bootloader_time_to_unix(const u8 boottime[8])
|
||||
{
|
||||
int year = bcd_number_to_decimal(boottime[0]) * 100 + bcd_number_to_decimal(boottime[1]);
|
||||
int month = bcd_number_to_decimal(boottime[2]);
|
||||
@ -51,7 +51,7 @@ static u64 bootloader_time_to_unix(u8 boottime[8])
|
||||
return broken_down_to_unix(year - 1900, make_yday(year, month) + (day - 1), hour, minute, second);
|
||||
}
|
||||
|
||||
extern BOOTBOOT bootboot;
|
||||
extern const BOOTBOOT bootboot;
|
||||
|
||||
namespace Timer
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "video/Framebuffer.h"
|
||||
#include <luna/String.h>
|
||||
|
||||
extern BOOTBOOT bootboot;
|
||||
extern const BOOTBOOT bootboot;
|
||||
|
||||
void Init::check_magic()
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "memory/MemoryMap.h"
|
||||
|
||||
extern BOOTBOOT bootboot;
|
||||
extern const BOOTBOOT bootboot;
|
||||
|
||||
static MemoryMapEntry memory_map_entry_from_mmapent(MMapEnt* ent)
|
||||
static MemoryMapEntry memory_map_entry_from_mmapent(const MMapEnt* ent)
|
||||
{
|
||||
MemoryMapEntry result;
|
||||
result.ptr = MMapEnt_Ptr(ent);
|
||||
@ -23,7 +23,7 @@ void MemoryMapIterator::rewind()
|
||||
m_cur_ent = 0;
|
||||
}
|
||||
|
||||
Result<MemoryMapEntry> MemoryMapIterator::at(usize index)
|
||||
Result<MemoryMapEntry> MemoryMapIterator::at(usize index) const
|
||||
{
|
||||
if (index >= m_mmap_entries) return err(ERANGE);
|
||||
return memory_map_entry_from_mmapent(m_base_ent + index);
|
||||
|
@ -23,15 +23,15 @@ class MemoryMapIterator
|
||||
|
||||
MemoryMapEntry highest();
|
||||
|
||||
Result<MemoryMapEntry> at(usize index);
|
||||
Result<MemoryMapEntry> at(usize index) const;
|
||||
|
||||
usize entries()
|
||||
usize entries() const
|
||||
{
|
||||
return m_mmap_entries;
|
||||
}
|
||||
|
||||
private:
|
||||
usize m_mmap_entries;
|
||||
MMapEnt* m_base_ent;
|
||||
const MMapEnt* m_base_ent;
|
||||
usize m_cur_ent;
|
||||
};
|
@ -7,7 +7,7 @@ static u32 g_fb_width;
|
||||
static u32 g_fb_height;
|
||||
static u32 g_fb_scanline;
|
||||
|
||||
extern BOOTBOOT bootboot;
|
||||
extern const BOOTBOOT bootboot;
|
||||
extern u8 fb[1];
|
||||
|
||||
namespace Framebuffer
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <luna/Format.h>
|
||||
#include <luna/String.h>
|
||||
|
||||
extern BOOTBOOT bootboot;
|
||||
extern const BOOTBOOT bootboot;
|
||||
|
||||
#include "video/BuiltinFont.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user