Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioping
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ioping
Commits
9172aae6
Commit
9172aae6
authored
Dec 30, 2013
by
Konstantin Khlebnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ioping: warn about unreliable results on poor platforms
Signed-off-by:
Konstantin Khlebnikov
<
koct9i@gmail.com
>
parent
6c0ec1d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
ioping.c
ioping.c
+9
-3
No files found.
ioping.c
View file @
9172aae6
...
@@ -118,7 +118,7 @@ void errx(int eval, const char *fmt, ...)
...
@@ -118,7 +118,7 @@ void errx(int eval, const char *fmt, ...)
exit
(
eval
);
exit
(
eval
);
}
}
void
warn
(
const
char
*
fmt
,
...)
void
warn
x
(
const
char
*
fmt
,
...)
{
{
va_list
ap
;
va_list
ap
;
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
...
@@ -856,9 +856,15 @@ int main (int argc, char **argv)
...
@@ -856,9 +856,15 @@ int main (int argc, char **argv)
flags
=
O_RDONLY
;
flags
=
O_RDONLY
;
#if !defined(HAVE_POSIX_FADVICE) && !defined(HAVE_NOCACHE_IO)
&& \
#if !defined(HAVE_POSIX_FADVICE) && !defined(HAVE_NOCACHE_IO)
defined(HAVE_DIRECT_IO)
# if
defined(HAVE_DIRECT_IO)
direct
|=
!
cached
;
direct
|=
!
cached
;
# else
if
(
!
cached
)
warnx
(
"non-cached I/O not supportted by this platform,"
" results will be unreliable."
);
cached
=
1
;
# endif
#endif
#endif
if
(
write_test
)
{
if
(
write_test
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment