From 6c549959c67e9fa252831bfc837f877180852893 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 8 Jan 2020 19:02:02 +0100 Subject: [PATCH] disk_benchmark: Unbreak this utility now that read() of O_WRONLY fails --- Userland/disk_benchmark.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/disk_benchmark.cpp b/Userland/disk_benchmark.cpp index 31cad04967..86f4656e84 100644 --- a/Userland/disk_benchmark.cpp +++ b/Userland/disk_benchmark.cpp @@ -116,11 +116,11 @@ int main(int argc, char** argv) Result benchmark(const String& filename, int file_size, int block_size, ByteBuffer& buffer, bool allow_cache) { - int flags = O_CREAT | O_TRUNC | O_WRONLY; + int flags = O_CREAT | O_TRUNC | O_RDWR; if (!allow_cache) flags |= O_DIRECT; - int fd = open(filename.characters(), flags); + int fd = open(filename.characters(), flags, 0644); if (fd == -1) { perror("open"); exit(1);