From 7dcf6715ffb3cc2f00f6327b896d16f173a1b082 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sat, 24 Feb 2018 06:45:44 +0100 Subject: New errno.h standard header Use standard errno codes. This change also adds strerror to string.h. --- kern/task.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kern/task.c') diff --git a/kern/task.c b/kern/task.c index 7039b426..5df72251 100644 --- a/kern/task.c +++ b/kern/task.c @@ -15,11 +15,11 @@ * along with this program. If not, see . */ +#include #include #include #include -#include #include #include #include @@ -74,7 +74,7 @@ task_shell_info(int argc, char *argv[]) task = task_lookup(argv[1]); if (task == NULL) { - error = ERROR_INVAL; + error = EINVAL; goto error; } @@ -85,7 +85,7 @@ task_shell_info(int argc, char *argv[]) return; error: - printf("task: info: %s\n", error_str(error)); + printf("task: info: %s\n", strerror(error)); } static struct shell_cmd task_shell_cmds[] = { @@ -138,7 +138,7 @@ task_create(struct task **taskp, const char *name) task = kmem_cache_alloc(&task_cache); if (task == NULL) { - error = ERROR_NOMEM; + error = ENOMEM; goto error_task; } -- cgit v1.2.3