summaryrefslogtreecommitdiff
path: root/vm/vm_map.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-02-24 06:45:44 +0100
committerRichard Braun <rbraun@sceen.net>2018-02-24 06:48:21 +0100
commit7dcf6715ffb3cc2f00f6327b896d16f173a1b082 (patch)
tree210570e98e074d7abade0d22c64e05b9c02435ba /vm/vm_map.c
parentbe5b9d6ab9f7e7a81c367e4bb0823ba11f85940f (diff)
New errno.h standard header
Use standard errno codes. This change also adds strerror to string.h.
Diffstat (limited to 'vm/vm_map.c')
-rw-r--r--vm/vm_map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c
index c0e9e116..91eedf85 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -20,11 +20,11 @@
*/
#include <assert.h>
+#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
-#include <kern/error.h>
#include <kern/init.h>
#include <kern/kmem.h>
#include <kern/list.h>
@@ -202,14 +202,14 @@ vm_map_find_fixed(struct vm_map *map, struct vm_map_request *request)
size = request->size;
if ((start < map->start) || (start + size) > map->end) {
- return ERROR_NOMEM;
+ return ENOMEM;
}
next = vm_map_lookup_nearest(map, start);
if (next == NULL) {
if ((map->end - start) < size) {
- return ERROR_NOMEM;
+ return ENOMEM;
}
request->next = NULL;
@@ -217,7 +217,7 @@ vm_map_find_fixed(struct vm_map *map, struct vm_map_request *request)
}
if ((start >= next->start) || ((next->start - start) < size)) {
- return ERROR_NOMEM;
+ return ENOMEM;
}
request->next = next;
@@ -281,7 +281,7 @@ retry:
goto retry;
}
- return ERROR_NOMEM;
+ return ENOMEM;
}
if (next == NULL) {
@@ -784,7 +784,7 @@ vm_map_create(struct vm_map **mapp)
map = kmem_cache_alloc(&vm_map_cache);
if (map == NULL) {
- error = ERROR_NOMEM;
+ error = ENOMEM;
goto error_map;
}