projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4aa2d0
)
Explicitly check td_trim(td) to detect open(2) flag
author
Tomohiro Kusumi
<tkusumi@tuxera.com>
Tue, 7 Mar 2017 20:12:58 +0000
(22:12 +0200)
committer
Jens Axboe
<axboe@fb.com>
Fri, 10 Mar 2017 21:43:37 +0000
(14:43 -0700)
This part is a bit complicated due to td's ddir being a bit flag.
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 9388bfc94b419e54e670b7410affda94c97ef9ea..fab9c5dec70b844aa40004ef98cc1794234927c3 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-619,7
+619,8
@@
open_again:
f->fd = dup(STDIN_FILENO);
else
from_hash = file_lookup_open(f, flags);
- } else { //td trim
+ } else if (td_trim(td)) {
+ assert(!td_rw(td)); /* should have matched above */
flags |= O_RDWR;
from_hash = file_lookup_open(f, flags);
}