ERR_NO_MEMORY -> ENOMEM

ERR_INVALID_ARGS -> EINVAL
CVSR_NOMEMO----------------------------------------------------------------


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@215 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David Reid 2002-07-14 10:22:17 +00:00
parent 4b6ac4574c
commit 7cf327ff5e
4 changed files with 10 additions and 10 deletions

View File

@ -48,13 +48,13 @@ int arch_cpu_init2(kernel_args *ka)
tss = kmalloc(sizeof(struct tss *) * ka->num_cpus);
if(tss == NULL) {
panic("arch_cpu_init2: could not allocate buffer for tss pointers\n");
return ERR_NO_MEMORY;
return ENOMEM;
}
tss_loaded = kmalloc(sizeof(int) * ka->num_cpus);
if(tss == NULL) {
panic("arch_cpu_init2: could not allocate buffer for tss booleans\n");
return ERR_NO_MEMORY;
return ENOMEM;
}
memset(tss_loaded, 0, sizeof(int) * ka->num_cpus);
@ -66,7 +66,7 @@ int arch_cpu_init2(kernel_args *ka)
REGION_ADDR_ANY_ADDRESS, PAGE_SIZE, REGION_WIRING_WIRED, LOCK_RW|LOCK_KERNEL);
if(rid < 0) {
panic("arch_cpu_init2: unable to create region for tss\n");
return ERR_NO_MEMORY;
return ENOMEM;
}
memset(tss[i], 0, sizeof(struct tss));

View File

@ -223,7 +223,7 @@ void i386_handle_trap(struct int_frame frame)
}
} else {
// want to pass too many args into the system
retcode = ERR_INVALID_ARGS;
retcode = EINVAL;
}
frame.eax = retcode & 0xffffffff;
frame.edx = retcode >> 32;

View File

@ -48,7 +48,7 @@ int arch_vm_init_endvm(kernel_args *ka)
REGION_ADDR_ANY_ADDRESS, 0xa0000, LOCK_RW|LOCK_KERNEL, 0x0);
if(id < 0) {
panic("arch_vm_init_endvm: unable to map dma region\n");
return ERR_NO_MEMORY;
return ENOMEM;
}
return 0;
}

View File

@ -505,7 +505,7 @@ restart:
if(flags == PHYSICAL_PAGE_NO_WAIT) {
// punt back to the caller and let them handle this
mutex_unlock(&iospace_mutex);
return ERR_NO_MEMORY;
return ENOMEM;
} else {
mutex_unlock(&iospace_mutex);
acquire_sem(iospace_full_sem);
@ -574,18 +574,18 @@ static vm_translation_map_ops tmap_ops = {
int vm_translation_map_create(vm_translation_map *new_map, bool kernel)
{
if(new_map == NULL)
return ERR_INVALID_ARGS;
return EINVAL;
dprintf("vm_translation_map_create\n");
// initialize the new object
new_map->ops = &tmap_ops;
new_map->map_count = 0;
if(recursive_lock_create(&new_map->lock) < 0)
return ERR_NO_MEMORY;
return ENOMEM;
new_map->arch_data = (vm_translation_map_arch_info *)kmalloc(sizeof(vm_translation_map_arch_info));
if(new_map == NULL)
return ERR_NO_MEMORY;
return ENOMEM;
new_map->arch_data->num_invalidate_pages = 0;
@ -595,7 +595,7 @@ dprintf("vm_translation_map_create\n");
new_map->arch_data->pgdir_virt = kmalloc(PAGE_SIZE);
if(new_map->arch_data->pgdir_virt == NULL) {
kfree(new_map->arch_data);
return ERR_NO_MEMORY;
return ENOMEM;
}
if(((addr)new_map->arch_data->pgdir_virt % PAGE_SIZE) != 0)
panic("vm_translation_map_create: malloced pgdir and found it wasn't aligned!\n");