Allow clients to get the console from the kernel object
This commit is contained in:
parent
3ad5e67e66
commit
6aa4453f77
3 changed files with 13 additions and 2 deletions
|
@ -55,6 +55,12 @@ Kernel::panic(const char* msg,
|
||||||
halt();
|
halt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console&
|
||||||
|
Kernel::console()
|
||||||
|
{
|
||||||
|
return mConsole;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private
|
* Private
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,6 +27,8 @@ struct Kernel
|
||||||
|
|
||||||
void halt() NORETURN;
|
void halt() NORETURN;
|
||||||
|
|
||||||
|
Console& console();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Console mConsole;
|
Console mConsole;
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,7 +32,10 @@ kmain(multiboot::Information *information,
|
||||||
multiboot::Information::setInformation(information);
|
multiboot::Information::setInformation(information);
|
||||||
auto info = multiboot::Information::information();
|
auto info = multiboot::Information::information();
|
||||||
|
|
||||||
kernel::Kernel::systemKernel().initialize();
|
auto& kernel = kernel::Kernel::systemKernel();
|
||||||
|
kernel.initialize();
|
||||||
|
|
||||||
|
auto& console = kernel.console();
|
||||||
|
|
||||||
console.printFormat("Command line: \"%s\"\n", info->commandLine());
|
console.printFormat("Command line: \"%s\"\n", info->commandLine());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue