Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
efba6726
Commit
efba6726
authored
Jul 20, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/tools/wr_mon: formatting fixes, sort port list
parent
0925f03b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
wr_mon.c
userspace/tools/wr_mon.c
+13
-4
No files found.
userspace/tools/wr_mon.c
View file @
efba6726
...
...
@@ -33,15 +33,24 @@ void init()
void
show_ports
()
{
int
i
;
int
i
,
j
;
term_pcprintf
(
3
,
1
,
C_BLUE
,
"Switch ports:"
);
for
(
i
=
0
;
i
<
port_list
.
num_ports
;
i
++
)
for
(
i
=
0
;
i
<
18
;
i
++
)
{
char
if_name
[
10
],
found
=
0
;
hexp_port_state_t
state
;
halexp_get_port_state
(
&
state
,
port_list
.
port_names
[
i
]);
term_pcprintf
(
5
+
i
,
1
,
C_WHITE
,
"%s: "
,
port_list
.
port_names
[
i
]);
snprintf
(
if_name
,
10
,
"wr%d"
,
i
);
for
(
j
=
0
;
j
<
port_list
.
num_ports
;
j
++
)
if
(
!
strcmp
(
port_list
.
port_names
[
j
],
if_name
))
{
found
=
1
;
break
;
}
if
(
!
found
)
continue
;
halexp_get_port_state
(
&
state
,
if_name
);
term_pcprintf
(
5
+
i
,
1
,
C_WHITE
,
"%05s: "
,
if_name
);
if
(
state
.
up
)
term_cprintf
(
C_GREEN
,
"Link up "
);
else
...
...
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