From 1e4a254674f668839e5de273916024c16814b045 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 13 Sep 2020 03:19:57 -0400 Subject: (basic, not much tested) keyboard, better panic --- src/kernel/fat.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/kernel/fat.c') diff --git a/src/kernel/fat.c b/src/kernel/fat.c index 1b6c52d..c297cab 100644 --- a/src/kernel/fat.c +++ b/src/kernel/fat.c @@ -89,7 +89,7 @@ static struct fat_info *next_fi; static void alloc_next_fi() { if (!((uint32_t)(next_fi = (struct fat_info *)((uint32_t)next_fi + 64)) & 0xfff)) if (!(next_fi = allocate_kernel_pages(1))) - panic("Out of memory in FAT driver."); + PANIC("Out of memory in FAT driver."); } static const struct drive *cur_drive; @@ -183,9 +183,9 @@ static const char *split_path(const char *path, uint8_t *fat_name_buffer) { ++pi; } else - panic("Bad path in FAT16 driver"); + PANIC("Bad path in FAT16 driver."); else if (((fi == 8) && (path[pi - 1] != EXT_SEP_CHAR)) || (fi == 11)) - panic("Bad path in FAT16 driver"); + PANIC("Bad path in FAT16 driver."); else { fat_name_buffer[fi++] = (uint8_t)path[pi++]; } @@ -229,7 +229,7 @@ static file_id_t fat_get_file(const struct drive *d, const char *path) { return n; } - panic("Maximum number of files open reached for FAT drive."); + PANIC("Maximum number of files open reached for FAT drive."); } static void fat_free_file(const struct drive *d, file_id_t fid) { @@ -365,7 +365,7 @@ void init_fat() { bool try_fat_init_drive(struct drive *d) { if (next_id >= MAX_FAT_DRIVES) - panic("Maximum number of FAT drives reached."); + PANIC("Maximum number of FAT drives reached."); if (!d->read_sectors(d, 0, 1, fat_driver_buffer)) return false; -- cgit v1.2.3