summaryrefslogtreecommitdiff
path: root/src/kernel/fat.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2020-09-13 03:19:57 -0400
committerBenji Dial <benji6283@gmail.com>2020-09-13 03:19:57 -0400
commit1e4a254674f668839e5de273916024c16814b045 (patch)
tree6774f4d4398a29c4aafb4120070975d864ffcde4 /src/kernel/fat.c
parentb8284137d4e0eec11c78bc14047243fce6a51373 (diff)
downloadportland-os-1e4a254674f668839e5de273916024c16814b045.tar.gz
(basic, not much tested) keyboard, better panic
Diffstat (limited to 'src/kernel/fat.c')
-rw-r--r--src/kernel/fat.c10
1 files changed, 5 insertions, 5 deletions
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;