mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 22:03:16 +01:00
Various minor fixes.
Removed some commented out code. Removed excessive printfs. Fixed spid not initialising for mm0 Fixed some faults with fs0. TODO: - Need to store vfs files in a separate list. - Need to define vnum as a vfs-file-specific data, i.e. in priv_data field of vm_file. - Need to then fix vfs_receive_sys_open.
This commit is contained in:
@@ -23,19 +23,19 @@ int __sys_kread(int rd, void *dest)
|
||||
|
||||
switch(rd) {
|
||||
case KDATA_PAGE_MAP:
|
||||
printk("Handling KDATA_PAGE_MAP request.\n");
|
||||
// printk("Handling KDATA_PAGE_MAP request.\n");
|
||||
if (check_access(vaddr, sizeof(page_map), MAP_USR_RW_FLAGS) < 0)
|
||||
return -EINVAL;
|
||||
memcpy(dest, &page_map, sizeof(page_map));
|
||||
break;
|
||||
case KDATA_BOOTDESC:
|
||||
printk("Handling KDATA_BOOTDESC request.\n");
|
||||
// printk("Handling KDATA_BOOTDESC request.\n");
|
||||
if (check_access(vaddr, bootdesc->desc_size, MAP_USR_RW_FLAGS) < 0)
|
||||
return -EINVAL;
|
||||
memcpy(dest, bootdesc, bootdesc->desc_size);
|
||||
break;
|
||||
case KDATA_BOOTDESC_SIZE:
|
||||
printk("Handling KDATA_BOOTDESC_SIZE request.\n");
|
||||
// printk("Handling KDATA_BOOTDESC_SIZE request.\n");
|
||||
if (check_access(vaddr, sizeof(unsigned int), MAP_USR_RW_FLAGS) < 0)
|
||||
return -EINVAL;
|
||||
*(unsigned int *)dest = bootdesc->desc_size;
|
||||
|
||||
Reference in New Issue
Block a user