From 10c4a9af585869da2d26c136c49cc79f2ca45e50 Mon Sep 17 00:00:00 2001 From: "Nathan P. Reiner" Date: Fri, 16 Dec 2022 09:33:11 +0100 Subject: implement wstdf --- smash/exec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'smash/exec.c') diff --git a/smash/exec.c b/smash/exec.c index 3b62f41..cd18ca4 100644 --- a/smash/exec.c +++ b/smash/exec.c @@ -6,9 +6,9 @@ #include "../lib/sys/pipe.h" #include "../lib/sys/dup2.h" #include "../lib/sys/close.h" -#include "../lib/sys/io.h" #include "../lib/sys/exit.h" #include "../lib/cstr/cstr.h" +#include "../lib/io/io.h" #include "parser.h" #include "builtin.h" @@ -58,9 +58,7 @@ void exec(char *line) close(pipefd[1][PIPE_IN]); execve(argv[0], argv, envp); - write(STDOUT_FD, "command not found: ", 19); - write(STDOUT_FD, argv[0], cstr_length(argv[0])); - write(STDOUT_FD, "\n", 1); + wstdf("command not found: %s\n", argv[0]); exit(-1); } -- cgit v1.2.3-70-g09d2