Fix up the build -- all the build errors
This commit is contained in:
parent
8411502db5
commit
75af75af4e
6 changed files with 14 additions and 12 deletions
|
@ -162,7 +162,6 @@ InterruptHandler::doKeyboardInterrupt()
|
|||
{
|
||||
// Quick 'n dirty read the scancode.
|
||||
unsigned int c = 0;
|
||||
auto& console = kernel::Console::systemConsole();
|
||||
do {
|
||||
c = kernel::io::inw(0x60);
|
||||
kstd::printFormat("Key! (scancode 0x%02X)\n", c);
|
||||
|
|
|
@ -44,7 +44,7 @@ Kernel::initialize(const StartupInformation& startupInformation)
|
|||
{
|
||||
mConsole.clear(kernel::Console::Color::Blue);
|
||||
|
||||
kstd::printString("Loading Polka...\n");
|
||||
kstd::printFormat("Loading Polka...\n");
|
||||
|
||||
kstd::printFormat("Kernel image: start = 0x%08lX, end = 0x%08lX, size = %ld bytes\n",
|
||||
startupInformation.kernelStart, startupInformation.kernelEnd,
|
||||
|
@ -76,7 +76,7 @@ Kernel::panic(const char* msg,
|
|||
{
|
||||
mConsole.clear(Console::Color::Magenta);
|
||||
|
||||
kstd::printString("PANIC! PANIC! PANIC! :-(\n");
|
||||
kstd::printFormat("PANIC! PANIC! PANIC! :-(\n");
|
||||
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
|
|
|
@ -197,6 +197,8 @@ printFormat(const char* format,
|
|||
Size
|
||||
} state = Default;
|
||||
|
||||
auto& cons = kernel::Kernel::systemKernel().console();
|
||||
|
||||
int nchars = 0;
|
||||
Spec spec;
|
||||
|
||||
|
@ -207,14 +209,14 @@ printFormat(const char* format,
|
|||
state = Percent;
|
||||
spec.clear();
|
||||
} else {
|
||||
printChar(*p);
|
||||
cons.printChar(*p);
|
||||
nchars++;
|
||||
}
|
||||
break;
|
||||
case Percent:
|
||||
if (*p == '%') {
|
||||
state = Default;
|
||||
printChar(*p);
|
||||
cons.printChar(*p);
|
||||
nchars++;
|
||||
} else if (Char::isDigit(*p)) {
|
||||
if (*p == '0' && !spec.zeroPadded) {
|
||||
|
@ -247,7 +249,7 @@ printFormat(const char* format,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
printChar(*p);
|
||||
cons.printChar(*p);
|
||||
nchars++;
|
||||
break;
|
||||
}
|
||||
|
@ -317,7 +319,7 @@ printFormat(const char* format,
|
|||
spec.type = Spec::Type::String;
|
||||
break;
|
||||
}
|
||||
nchars += spec.print(kernel::systemKernel().console());
|
||||
nchars += spec.print(cons);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ namespace kstd {
|
|||
* @return Number of characters printed
|
||||
* @{
|
||||
*/
|
||||
int printFormat(const char* format, ...) PRINTF(2,3);
|
||||
int printFormat(const char* format, ...) PRINTF(1,2);
|
||||
int printFormat(const char* format, va_list args);
|
||||
/** @} */
|
||||
|
||||
|
||||
} /* namespace kstd */
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include "Memory.hh"
|
||||
#include "kstd/PrintFormat.hh"
|
||||
|
||||
namespace kernel {
|
||||
|
||||
|
@ -15,10 +16,10 @@ namespace kernel {
|
|||
*/
|
||||
|
||||
void
|
||||
MemoryManager::initialize(Console& console)
|
||||
MemoryManager::initialize()
|
||||
{
|
||||
initializeGDT();
|
||||
console.printString("GDT loaded\n");
|
||||
kstd::printFormat("GDT loaded\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace kernel {
|
|||
|
||||
struct MemoryManager
|
||||
{
|
||||
void initialize(Console& console);
|
||||
void initialize();
|
||||
|
||||
private:
|
||||
x86::GDT mGDT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue