From 4c8caaec8e856686581feb0a84089cdad07a0018 Mon Sep 17 00:00:00 2001
From: dzwdz
Date: Wed, 3 Aug 2022 13:20:50 +0200
Subject: user/libc: "!files"

similar to /dev/{stdin,stdout,stderr} on Linux, except handled by the
libc instead of the kernel

because that's the simplest way
---
 src/user/app/shell/builtins.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/user/app')

diff --git a/src/user/app/shell/builtins.c b/src/user/app/shell/builtins.c
index e272cf3..d0a2e3a 100644
--- a/src/user/app/shell/builtins.c
+++ b/src/user/app/shell/builtins.c
@@ -13,7 +13,7 @@ static void cmd_cat(int argc, const char **argv) {
 	if (argv[1])
 		file = fopen(argv[1], "r");
 	else
-		file = file_clone(stdin);
+		file = file_clone(stdin, "r");
 
 	if (!file) {
 		eprintf("couldn't open");
-- 
cgit v1.2.3