diff options
-rw-r--r-- | src/include/kernel/console.H | 2 | ||||
-rw-r--r-- | src/kernel/console.C | 10 | ||||
-rw-r--r-- | src/kernel/exception.C | 4 | ||||
-rw-r--r-- | src/kernel/pagemgr.C | 2 | ||||
-rw-r--r-- | src/sys/init/init_main.C | 6 | ||||
-rw-r--r-- | src/sys/vfs/vfs_main.C | 2 | ||||
-rw-r--r-- | src/usr/example/example.C | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/include/kernel/console.H b/src/include/kernel/console.H index 31bb9c94a..e12f66a62 100644 --- a/src/include/kernel/console.H +++ b/src/include/kernel/console.H @@ -4,7 +4,7 @@ #include <stdint.h> #include <string.h> -void printk(const char*, ...); +void printk(const char*, ...) __attribute__((format (printf, 1, 2))); class Console { diff --git a/src/kernel/console.C b/src/kernel/console.C index 032d74213..6cc2d1dac 100644 --- a/src/kernel/console.C +++ b/src/kernel/console.C @@ -180,12 +180,12 @@ void printk(const char* str, ...) break; case 2: - case 3: ConsoleDisplay<int, ConsoleTraits::DEC> ::display(console, va_arg(args,int)); break; + case 3: case 4: ConsoleDisplay<long, ConsoleTraits::DEC> ::display(console, @@ -214,12 +214,12 @@ void printk(const char* str, ...) break; case 2: - case 3: ConsoleDisplay<unsigned int, ConsoleTraits::DEC> ::display(console, va_arg(args,unsigned int)); break; - + + case 3: case 4: ConsoleDisplay<unsigned long, ConsoleTraits::DEC> ::display(console, @@ -249,12 +249,12 @@ void printk(const char* str, ...) break; case 2: - case 3: ConsoleDisplay<unsigned int, ConsoleTraits::HEX> ::display(console, va_arg(args,unsigned int)); break; - + + case 3: case 4: ConsoleDisplay<unsigned long, ConsoleTraits::HEX> ::display(console, diff --git a/src/kernel/exception.C b/src/kernel/exception.C index 040284d72..568d80842 100644 --- a/src/kernel/exception.C +++ b/src/kernel/exception.C @@ -52,7 +52,7 @@ void kernel_execute_data_storage() } if (!handled) { - printk("Data Storage exception on %d: %llx, %llx\n", + printk("Data Storage exception on %d: %lx, %lx\n", t->tid, ppc_getDAR(), ppc_getDSISR()); Systemcalls::TaskEnd(t); } @@ -94,7 +94,7 @@ namespace ExceptionHandles { bool HvEmulation(task_t* t) { - /*printk("NIP = %llx : Inst = %lx\n", + /*printk("NIP = %lx : Inst = %x\n", t->context.nip, (*(uint32_t*)t->context.nip));*/ diff --git a/src/kernel/pagemgr.C b/src/kernel/pagemgr.C index 2a92df206..972508420 100644 --- a/src/kernel/pagemgr.C +++ b/src/kernel/pagemgr.C @@ -32,7 +32,7 @@ PageManager::PageManager() size_t length = (MEMLEN - addr) / PAGESIZE; // Display. - printk("Initializing PageManager with %zd pages starting at %llx...", + printk("Initializing PageManager with %zd pages starting at %lx...", length, (uint64_t)page); diff --git a/src/sys/init/init_main.C b/src/sys/init/init_main.C index 6beba9ab0..f409eef49 100644 --- a/src/sys/init/init_main.C +++ b/src/sys/init/init_main.C @@ -37,7 +37,7 @@ void init_main(void* unused) /* uint64_t* mmio_addr = (uint64_t*) mmio_map((void*)0x800000000, 1); - printk("MMIO Access %llx\n", *mmio_addr); + printk("MMIO Access %lx\n", *mmio_addr); global_mutex = mutex_create(); @@ -49,7 +49,7 @@ void init_main(void* unused) msg_send(msgq, msg); msg = msg_wait(msgq); - printk("Got Message: %llx\n", msg->data[0]); + printk("Got Message: %lx\n", msg->data[0]); while(1) { @@ -65,7 +65,7 @@ void init_main(void* unused) volatile uint64_t* ptr = (uint64_t*) 0x3000; (*ptr) = 0x1234; - printk("Value = %llx\n", *ptr); + printk("Value = %lx\n", *ptr); while(1) task_yield(); diff --git a/src/sys/vfs/vfs_main.C b/src/sys/vfs/vfs_main.C index 0b41bb631..3efb99002 100644 --- a/src/sys/vfs/vfs_main.C +++ b/src/sys/vfs/vfs_main.C @@ -75,7 +75,7 @@ void vfs_main(void* unused) e->msg_q = (msg_q_t) msg->data[0]; vfsContents.insert(e); - printk("VFS: Registering %llx as %s\n", + printk("VFS: Registering %lx as %s\n", e->msg_q, e->key.key); msg_respond(vfsMsgQ, msg); } diff --git a/src/usr/example/example.C b/src/usr/example/example.C index 2fd0ef367..873291be2 100644 --- a/src/usr/example/example.C +++ b/src/usr/example/example.C @@ -18,7 +18,7 @@ void _init(void*) ctors++; } - printk("Here! %llx, %s\n", (uint64_t) value, VFS_ROOT); + printk("Here! %lx, %s\n", (uint64_t) value, VFS_ROOT); } extern "C" |