From b26399ad055aae9ef4b01694967515235568cd85 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 30 Jul 2022 14:52:22 +0200 Subject: user: stderr --- src/user/app/shell/builtins.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/user/app/shell/builtins.c') diff --git a/src/user/app/shell/builtins.c b/src/user/app/shell/builtins.c index fef46a5..3a19a2f 100644 --- a/src/user/app/shell/builtins.c +++ b/src/user/app/shell/builtins.c @@ -1,4 +1,5 @@ #include "builtins.h" +#include "shell.h" #include #include #include @@ -27,7 +28,7 @@ void cmd_cat_ls(const char *args, bool ls) { } if (!file) { - printf("couldn't open.\n"); + eprintf("couldn't open"); return; } @@ -50,7 +51,7 @@ void cmd_hexdump(const char *args) { fd = _syscall_open(args, strlen(args), 0); if (fd < 0) { - printf("couldn't open.\n"); + eprintf("couldn't open %s", args); return; } @@ -79,7 +80,7 @@ void cmd_hexdump(const char *args) { void cmd_touch(const char *args) { int fd = _syscall_open(args, strlen(args), OPEN_CREATE); if (fd < 0) { - printf("couldn't create file.\n"); + eprintf("couldn't touch %s\n", args); return; } close(fd); -- cgit v1.2.3