Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EtherBone Core
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
EtherBone Core
Commits
8dc69362
Commit
8dc69362
authored
13 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
Re-order the bus ID to look better.
parent
20b77d9e
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/tools/eb-ls.c
+10
-5
10 additions, 5 deletions
api/tools/eb-ls.c
with
10 additions
and
5 deletions
api/tools/eb-ls.c
+
10
−
5
View file @
8dc69362
...
@@ -64,10 +64,14 @@ struct bus_record {
...
@@ -64,10 +64,14 @@ struct bus_record {
};
};
static
void
print_id
(
struct
bus_record
*
br
)
{
static
void
print_id
(
struct
bus_record
*
br
)
{
if
(
br
->
i
==
-
1
)
return
;
if
(
br
->
i
==
-
1
)
{
fprintf
(
stdout
,
"root"
);
fprintf
(
stdout
,
".%d"
,
br
->
i
);
}
else
if
(
br
->
parent
->
i
==
-
1
)
{
print_id
(
br
->
parent
);
fprintf
(
stdout
,
"%d"
,
br
->
i
+
1
);
}
else
{
print_id
(
br
->
parent
);
fprintf
(
stdout
,
".%d"
,
br
->
i
+
1
);
}
}
}
static
int
norecurse
;
static
int
norecurse
;
...
@@ -83,7 +87,7 @@ static void list_devices(eb_user_data_t user, eb_device_t dev, sdwb_t sdwb, eb_s
...
@@ -83,7 +87,7 @@ static void list_devices(eb_user_data_t user, eb_device_t dev, sdwb_t sdwb, eb_s
exit
(
1
);
exit
(
1
);
}
}
fprintf
(
stdout
,
"SDWB Bus
\n
"
);
fprintf
(
stdout
,
"SDWB Bus
"
);
print_id
(
br
.
parent
);
fprintf
(
stdout
,
"
\n
"
);
fprintf
(
stdout
,
" magic: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x
\n
"
fprintf
(
stdout
,
" magic: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x
\n
"
" %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x
\n
"
,
" %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x
\n
"
,
sdwb
->
bus
.
magic
[
0
],
sdwb
->
bus
.
magic
[
1
],
sdwb
->
bus
.
magic
[
0
],
sdwb
->
bus
.
magic
[
1
],
...
@@ -166,6 +170,7 @@ static void list_devices(eb_user_data_t user, eb_device_t dev, sdwb_t sdwb, eb_s
...
@@ -166,6 +170,7 @@ static void list_devices(eb_user_data_t user, eb_device_t dev, sdwb_t sdwb, eb_s
fprintf
(
stdout
,
" dev_version: %08"
PRIx32
"
\n
"
,
des
->
dev_version
);
fprintf
(
stdout
,
" dev_version: %08"
PRIx32
"
\n
"
,
des
->
dev_version
);
fprintf
(
stdout
,
" dev_date: %08"
PRIx32
"
\n
"
,
des
->
dev_date
);
fprintf
(
stdout
,
" dev_date: %08"
PRIx32
"
\n
"
,
des
->
dev_date
);
fprintf
(
stdout
,
" description: "
);
fwrite
(
des
->
description
,
1
,
16
,
stdout
);
fprintf
(
stdout
,
"
\n
"
);
fprintf
(
stdout
,
" description: "
);
fwrite
(
des
->
description
,
1
,
16
,
stdout
);
fprintf
(
stdout
,
"
\n
"
);
fprintf
(
stdout
,
"
\n
"
);
if
(
!
norecurse
&&
child
&&
!
bad
)
{
if
(
!
norecurse
&&
child
&&
!
bad
)
{
br
.
bus_begin
=
des
->
wbd_begin
;
br
.
bus_begin
=
des
->
wbd_begin
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment