summaryrefslogtreecommitdiff
path: root/kern/task.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 /kern/task.c
parentbe5b9d6ab9f7e7a81c367e4bb0823ba11f85940f (diff)
New errno.h standard header
Use standard errno codes. This change also adds strerror to string.h.
Diffstat (limited to 'kern/task.c')
-rw-r--r--kern/task.c8
1 files changed, 4 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
*/
+#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
-#include <kern/error.h>
#include <kern/init.h>
#include <kern/kmem.h>
#include <kern/list.h>
@@ -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;
}