mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 17:53:13 +01:00
Modified the kernel and all tasks with well-formatted printout messages.
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
void wait_pager(l4id_t partner)
|
||||
{
|
||||
l4_send(partner, L4_IPC_TAG_SYNC);
|
||||
printf("%s: Pager synced with us.\n", __TASKNAME__);
|
||||
// printf("%s: Pager synced with us.\n", __TASKNAME__);
|
||||
}
|
||||
|
||||
void handle_fs_requests(void)
|
||||
@@ -135,13 +135,13 @@ void handle_fs_requests(void)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
printf("\n%s: Started with tid: %d\n", __TASKNAME__, self_tid());
|
||||
printf("\n%s: Started with thread id: %d\n", __TASKNAME__, self_tid());
|
||||
|
||||
initialise();
|
||||
|
||||
wait_pager(PAGER_TID);
|
||||
|
||||
printf("%s: Listening requests.\n", __TASKNAME__);
|
||||
printf("%s: VFS service initialized. Listening requests.\n", __TASKNAME__);
|
||||
while (1) {
|
||||
handle_fs_requests();
|
||||
}
|
||||
|
||||
@@ -78,6 +78,8 @@ int initialise(void)
|
||||
/* Mount the filesystem on the root device */
|
||||
vfs_mount_root(root_sb);
|
||||
|
||||
printf("%s: Mounted memfs root filesystem.\n", __TASKNAME__);
|
||||
|
||||
/* Learn about what tasks are running */
|
||||
init_task_data();
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ struct superblock *memfs_get_superblock(void *block)
|
||||
struct memfs_superblock *sb = block;
|
||||
struct superblock *vfs_sb;
|
||||
|
||||
printf("%s: %s: Reading superblock.\n", __TASKNAME__, __FUNCTION__);
|
||||
// printf("%s: %s: Reading superblock.\n", __TASKNAME__, __FUNCTION__);
|
||||
/* We don't do sanity checks here, just confirm id. */
|
||||
if (strcmp(sb->name, "memfs")) {
|
||||
printf("%s: Name does not match: %s\n", __FUNCTION__, sb->name);
|
||||
|
||||
@@ -416,8 +416,8 @@ int pager_sys_write(struct tcb *pager, unsigned long vnum, unsigned long f_offse
|
||||
if (vfs_isdir(v))
|
||||
return -EISDIR;
|
||||
|
||||
printf("%s/%s: Writing to vnode %lu, at pgoff 0x%x, %d pages, buf at 0x%x\n",
|
||||
__TASKNAME__, __FUNCTION__, vnum, f_offset, npages, pagebuf);
|
||||
//printf("%s/%s: Writing to vnode %lu, at pgoff 0x%x, %d pages, buf at 0x%x\n",
|
||||
// __TASKNAME__, __FUNCTION__, vnum, f_offset, npages, pagebuf);
|
||||
|
||||
if ((ret = v->fops.write(v, f_offset, npages, pagebuf)) < 0)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user