summaryrefslogtreecommitdiff
path: root/src/user/app/shell
diff options
context:
space:
mode:
authordzwdz2022-08-20 11:11:57 +0200
committerdzwdz2022-08-20 11:11:57 +0200
commitf22f019aeba00ccb3cc35fe763c3e87bf5690040 (patch)
tree6f7338b526dca6eebc865096dbdbd3af90cda335 /src/user/app/shell
parent2a16c1f6f9118e7127d532421ae19b959b3f1d87 (diff)
user/ethdump: turn into a file server
Diffstat (limited to 'src/user/app/shell')
-rw-r--r--src/user/app/shell/builtins.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/user/app/shell/builtins.c b/src/user/app/shell/builtins.c
index 23a8221..1be9b5b 100644
--- a/src/user/app/shell/builtins.c
+++ b/src/user/app/shell/builtins.c
@@ -28,7 +28,7 @@ static void cmd_cat(int argc, char **argv) {
}
if (!strcmp(argv[i], "!stdin")) fextflags(file, FEXT_NOFILL);
for (;;) {
- int len = fread(buf, 1, sizeof buf, file);
+ int len = fread(buf, 1, buflen, file);
if (len <= 0) break;
fwrite(buf, 1, len, stdout);
}