diff options
| author | Jake Mannens <jakem_5@hotmail.com> | 2020-03-18 14:01:12 +1100 |
|---|---|---|
| committer | Jake Mannens <jakem_5@hotmail.com> | 2020-03-18 14:01:12 +1100 |
| commit | 4d6fe1c317f0a541922f4cf945365fd31e608e10 (patch) | |
| tree | b78f721d50924094d4926ee90131a98ba12eb95e /kernel/fs/buffer.c | |
| parent | eda36531e8daedd045fb02c9c590cdf4dddd957f (diff) | |
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.
Diffstat (limited to 'kernel/fs/buffer.c')
| -rw-r--r-- | kernel/fs/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |
