From a09232a555c94abc01ce6397d044b8ed8ce80974 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 16 Aug 2023 09:33:14 +0300 Subject: [PATCH] cat: use 1025 buffer. this allows reads to be 1024 byte reading from disk currently returns ENOTSUP if buffer size is not multiple of sector size. --- userspace/cat/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/cat/main.cpp b/userspace/cat/main.cpp index fd053072..ec8fbf8f 100644 --- a/userspace/cat/main.cpp +++ b/userspace/cat/main.cpp @@ -2,7 +2,7 @@ bool cat_file(FILE* fp) { - char buffer[1024]; + char buffer[1025]; size_t n_read; while ((n_read = fread(buffer, 1, sizeof(buffer) - 1, fp)) > 0) {