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
7ded7a65
Commit
7ded7a65
authored
Jul 17, 2011
by
Konstantin Khlebnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ioping: add builtin version and -v
Signed-off-by:
Konstantin Khlebnikov
<
koct9i@gmail.com
>
parent
59575633
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
Makefile
Makefile
+1
-1
ioping.1
ioping.1
+3
-0
ioping.c
ioping.c
+10
-1
No files found.
Makefile
View file @
7ded7a65
...
@@ -27,7 +27,7 @@ install: $(BINS) $(MANS)
...
@@ -27,7 +27,7 @@ install: $(BINS) $(MANS)
install
-m
644
$(MANS)
$(DESTDIR)$(MAN1DIR)
install
-m
644
$(MANS)
$(DESTDIR)$(MAN1DIR)
%.o
:
%.c
%.o
:
%.c
$(CC)
$(CFLAGS)
-c
-o
$@
$^
$(CC)
$(CFLAGS)
-
DVERSION
=
\"
${VERSION}
\"
-
c
-o
$@
$^
ioping
:
$(OBJS)
ioping
:
$(OBJS)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LDFLAGS)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LDFLAGS)
...
...
ioping.1
View file @
7ded7a65
...
@@ -58,6 +58,9 @@ Suppress human-readable output.
...
@@ -58,6 +58,9 @@ Suppress human-readable output.
.TP
.TP
.B \-h
.B \-h
Display help message and exit.
Display help message and exit.
.TP
.B \-v
Display version and exit.
.SS Argument suffixes
.SS Argument suffixes
For options that expect time argument (\fB\-i\fR and \fB\-w\fR),
For options that expect time argument (\fB\-i\fR and \fB\-w\fR),
default is seconds, unless you specify one of the following suffixes
default is seconds, unless you specify one of the following suffixes
...
...
ioping.c
View file @
7ded7a65
...
@@ -102,10 +102,16 @@ void usage(void)
...
@@ -102,10 +102,16 @@ void usage(void)
" -R seek rate test (same as -q -i 0 -w 3)
\n
"
" -R seek rate test (same as -q -i 0 -w 3)
\n
"
" -q suppress human-readable output
\n
"
" -q suppress human-readable output
\n
"
" -h display this message and exit
\n
"
" -h display this message and exit
\n
"
" -v display version and exit
\n
"
"
\n
"
"
\n
"
);
);
}
}
void
version
(
void
)
{
fprintf
(
stderr
,
"ioping %s
\n
"
,
VERSION
);
}
struct
suffix
{
struct
suffix
{
const
char
*
txt
;
const
char
*
txt
;
long
long
mul
;
long
long
mul
;
...
@@ -246,11 +252,14 @@ void parse_options(int argc, char **argv)
...
@@ -246,11 +252,14 @@ void parse_options(int argc, char **argv)
exit
(
1
);
exit
(
1
);
}
}
while
((
opt
=
getopt
(
argc
,
argv
,
"hLRDCqi:w:s:S:c:o:p:"
))
!=
-
1
)
{
while
((
opt
=
getopt
(
argc
,
argv
,
"h
v
LRDCqi:w:s:S:c:o:p:"
))
!=
-
1
)
{
switch
(
opt
)
{
switch
(
opt
)
{
case
'h'
:
case
'h'
:
usage
();
usage
();
exit
(
0
);
exit
(
0
);
case
'v'
:
version
();
exit
(
0
);
case
'L'
:
case
'L'
:
randomize
=
0
;
randomize
=
0
;
size
=
1
<<
18
;
size
=
1
<<
18
;
...
...
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