vfs: add ifdef guards for debug messages

This commit is contained in:
Michael Shaw 2023-11-01 15:33:44 -04:00
commit 5321558a25

View file

@ -273,7 +273,9 @@ void vfs_init(const char *rootdev_name)
panic(); panic();
} }
#ifdef KDEBUG
kprintf(LOG_DEBUG "Found root device %s\n", rootdev_name); kprintf(LOG_DEBUG "Found root device %s\n", rootdev_name);
#endif
/* TODO: detect filesystem type */ /* TODO: detect filesystem type */
/* for now, assume ext2 */ /* for now, assume ext2 */
@ -282,7 +284,9 @@ void vfs_init(const char *rootdev_name)
kprintf(LOG_ERROR "Failed to mount root device %s\n", rootdev_name); kprintf(LOG_ERROR "Failed to mount root device %s\n", rootdev_name);
panic(); panic();
} else { } else {
#ifdef KDEBUG
kprintf(LOG_DEBUG "Mounted root device %s\n", rootdev_name); kprintf(LOG_DEBUG "Mounted root device %s\n", rootdev_name);
#endif
} }
fs->mount_point = kzalloc(2, ALLOC_KERN); fs->mount_point = kzalloc(2, ALLOC_KERN);