From 4d6fe1c317f0a541922f4cf945365fd31e608e10 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Wed, 18 Mar 2020 14:01:12 +1100 Subject: Added decimal and octal conversion specifiers ('%d' and '%o') to vsprintf(). Coverted all printk()/printf() functions to capatalised hex for readability. Tidied up some code. --- kernel/fs/buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel/fs/buffer.c') diff --git a/kernel/fs/buffer.c b/kernel/fs/buffer.c index 99c3161..b106afc 100644 --- a/kernel/fs/buffer.c +++ b/kernel/fs/buffer.c @@ -38,10 +38,10 @@ struct buffer *buffer_get_block(uint16_t device, uint16_t block) { /* if the buffer exists but isn't populated. wait on it */ if(!b->b_present) { sleep_on(&b->b_wait); - printk("[buf] Waiting for buffer %04x:%04x to be populated...\n", b->b_device, b->b_block); + printk("[buf] Waiting for buffer %04X:%04X to be populated...\n", b->b_device, b->b_block); } sti(); - printk("[buf] Fetched block %04x:%04x from cache\n", b->b_device, b->b_block); + printk("[buf] Fetched block %04X:%04X from cache\n", b->b_device, b->b_block); return b->b_device ? b : NULL; next: p = &b->b_prev; @@ -68,7 +68,7 @@ next: b->b_present = 0; block_read(b); wake_up(&b->b_wait); - printk("[buf] Called driver to read block %04x:%04x\n", b->b_device, b->b_block); + printk("[buf] Called driver to read block %04X:%04X\n", b->b_device, b->b_block); return b->b_device ? b : NULL; } @@ -98,5 +98,5 @@ void buffer_init(void) { lru = (struct buffer*) BSTART; mru = last; - printk("[buf] Buffers initialized (0x%x buffers in pool)\n", c); + printk("[buf] Buffers initialized (%d buffers [%dKiB] in pool)\n", c, c * BLOCK_SIZE / 1024); } -- cgit v1.3