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
c2339039
Commit
c2339039
authored
Jan 02, 2015
by
Konstantin Khlebnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ioping: always respect explicitly set size
Signed-off-by:
Konstantin Khlebnikov
<
koct9i@gmail.com
>
parent
93b8a549
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
ioping.c
ioping.c
+9
-5
No files found.
ioping.c
View file @
c2339039
...
...
@@ -419,7 +419,8 @@ long long interval = 1000000;
struct
timespec
interval_ts
;
long
long
deadline
=
0
;
ssize_t
size
=
1
<<
12
;
ssize_t
default_size
=
1
<<
12
;
ssize_t
size
=
0
;
off_t
wsize
=
0
;
off_t
temp_wsize
=
1
<<
20
;
...
...
@@ -452,7 +453,7 @@ void parse_options(int argc, char **argv)
exit
(
0
);
case
'L'
:
randomize
=
0
;
size
=
1
<<
18
;
default_
size
=
1
<<
18
;
break
;
case
'R'
:
interval
=
0
;
...
...
@@ -927,14 +928,17 @@ int main (int argc, char **argv)
interval_ts
.
tv_sec
=
interval
/
1000000
;
interval_ts
.
tv_nsec
=
(
interval
%
1000000
)
*
1000
;
if
(
!
size
)
size
=
default_size
;
if
(
size
<=
0
)
errx
(
1
,
"request size must be greather than zero"
);
if
(
wsize
)
temp_wsize
=
wsize
;
else
if
(
size
>
temp_wsize
)
temp_wsize
=
size
;
if
(
size
<=
0
)
errx
(
1
,
"request size must be greather than zero"
);
flags
=
O_RDONLY
;
#if !defined(HAVE_POSIX_FADVICE) && !defined(HAVE_NOCACHE_IO)
...
...
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