projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a8600b
)
fix posix_fallocate() return value usage
author
Greg Edwards
<greg.edwards@hp.com>
Fri, 25 Jun 2010 15:25:22 +0000
(09:25 -0600)
committer
Jens Axboe
<jaxboe@fusionio.com>
Mon, 28 Jun 2010 06:12:30 +0000
(08:12 +0200)
posix_fallocate() returns the error number on failure. Fix the return value
usage.
Signed-off-by: Greg Edwards <greg.edwards@hp.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index b90d12ae8f17aefb4aeb11c1dac3a45b697c9546..f0883901b466969ffa6499946bf9801f06844610 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-71,9
+71,9
@@
static int extend_file(struct thread_data *td, struct fio_file *f)
f->real_file_size);
r = posix_fallocate(f->fd, 0, f->real_file_size);
- if (r
<
0) {
+ if (r
>
0) {
log_err("fio: posix_fallocate fails: %s\n",
- strerror(
-
r));
+ strerror(r));
}
}
#endif