Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
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
net-tools
Commits
adf6f579
Commit
adf6f579
authored
Sep 10, 2015
by
Tomáš Odehnal
Committed by
Bernd Eckenfels
Oct 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netstat: unrecognized option -> non-zero exit code
Signed-off-by:
Jiri Popelka
<
jpopelka@redhat.com
>
parent
73cef8a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
netstat.c
netstat.c
+5
-4
No files found.
netstat.c
View file @
adf6f579
...
...
@@ -1926,7 +1926,7 @@ static void version(void)
}
static
void
usage
(
void
)
static
void
usage
(
int
rc
)
{
fprintf
(
stderr
,
_
(
"usage: netstat [-vWeenNcCF] [<Af>] -r netstat {-V|--version|-h|--help}
\n
"
));
fprintf
(
stderr
,
_
(
" netstat [-vWnNcaeol] [<Socket> ...]
\n
"
));
...
...
@@ -1964,7 +1964,7 @@ static void usage(void)
fprintf
(
stderr
,
_
(
" <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s
\n
"
),
DFLT_AF
);
fprintf
(
stderr
,
_
(
" List of possible address families (which support routing):
\n
"
));
print_aflist
(
1
);
/* 1 = routeable */
exit
(
E_USAGE
);
exit
(
rc
);
}
...
...
@@ -2148,14 +2148,15 @@ int main
break
;
case
'?'
:
usage
(
E_OPTERR
);
case
'h'
:
usage
();
usage
(
E_USAGE
);
case
's'
:
flag_sta
++
;
}
if
(
flag_int
+
flag_rou
+
flag_mas
+
flag_sta
>
1
)
usage
();
usage
(
E_OPTERR
);
if
((
flag_inet
||
flag_inet6
||
flag_sta
)
&&
!
(
flag_tcp
||
flag_sctp
||
flag_udp
||
flag_udplite
||
flag_raw
))
...
...
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