mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
disk_benchmark: Unbreak this utility now that read() of O_WRONLY fails
This commit is contained in:
parent
dacec1a7ee
commit
6c549959c6
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue