commit | 173081581f94dc4f9f203eb7a7922fc843bfafde | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Fri Mar 07 13:42:31 2008 +0100 |
committer | Jens Axboe <jens.axboe@oracle.com> | Fri Mar 07 13:42:31 2008 +0100 |
tree | b9861b66949fc9c3888a93a7199f9bf49ff726f7 | |
parent | ed4aa70764eb13c4bb36cd1b0647c26859f7bbd0 [diff] [blame] |
Only set O_RDWR for open() when readonly isn't set Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/filesetup.c b/filesetup.c index 37a3439..5c02f1c 100644 --- a/filesetup.c +++ b/filesetup.c
@@ -291,9 +291,8 @@ open_again: if (td_write(td)) { - assert(!read_only); - - flags |= O_RDWR; + if (!read_only) + flags |= O_RDWR; if (f->filetype == FIO_TYPE_FILE) flags |= O_CREAT;