projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure we have enough room for the ETA runstr
[fio.git]
/
libfio.c
diff --git
a/libfio.c
b/libfio.c
index 5ed8c6073603d4edb0b381fb356694cce600e04b..8af11297e17c5eed31bd3e23df72ed40c1bfab25 100644
(file)
--- a/
libfio.c
+++ b/
libfio.c
@@
-234,7
+234,7
@@
int fio_running_or_pending_io_threads(void)
return 0;
}
return 0;
}
-
void
fio_set_fd_nonblocking(int fd, const char *who)
+
int
fio_set_fd_nonblocking(int fd, const char *who)
{
int flags;
{
int flags;
@@
-242,11
+242,14
@@
void fio_set_fd_nonblocking(int fd, const char *who)
if (flags < 0)
log_err("fio: %s failed to get file flags: %s\n", who, strerror(errno));
else {
if (flags < 0)
log_err("fio: %s failed to get file flags: %s\n", who, strerror(errno));
else {
- flags |= O_NONBLOCK;
- flags = fcntl(fd, F_SETFL, flags);
- if (flags < 0)
+ int new_flags = flags | O_NONBLOCK;
+
+ new_flags = fcntl(fd, F_SETFL, new_flags);
+ if (new_flags < 0)
log_err("fio: %s failed to get file flags: %s\n", who, strerror(errno));
}
log_err("fio: %s failed to get file flags: %s\n", who, strerror(errno));
}
+
+ return flags;
}
static int endian_check(void)
}
static int endian_check(void)