Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Mock Turtle
Commits
7f974a1b
Commit
7f974a1b
authored
Jul 08, 2015
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd:tools: simplify logging application
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
8b09a460
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
wrtd-logging.c
applications/wrtd/tools/wrtd-logging.c
+6
-8
No files found.
applications/wrtd/tools/wrtd-logging.c
View file @
7f974a1b
...
...
@@ -22,8 +22,6 @@ static void help()
fprintf
(
stderr
,
"-D device id
\n
"
);
fprintf
(
stderr
,
"-n number of messages to read (0 means infinite)
\n
"
);
fprintf
(
stderr
,
"-s share the logging device with other processes
\n
"
);
fprintf
(
stderr
,
"-c <ch> channel to listen
\n
"
);
fprintf
(
stderr
,
"-l"
);
exit
(
1
);
}
...
...
@@ -40,8 +38,11 @@ static int print_message(struct wrnc_hmq *hmq)
fprintf
(
stdout
,
"Channel %d
\n
"
,
log
.
channel
);
fprintf
(
stdout
,
"Miss reason %x
\n
"
,
log
.
miss_reason
);
fprintf
(
stdout
,
"Seq %d
\n
"
,
log
.
seq
);
fprintf
(
stdout
,
"Identifier %04x:%04x:%04x
\n
"
,
log
.
id
.
system
,
log
.
id
.
source_port
,
log
.
id
.
trigger
);
if
(
log
.
type
!=
WRTD_LOG_RAW
)
fprintf
(
stdout
,
"Identifier ----:----:----
\n
"
);
else
fprintf
(
stdout
,
"Identifier %04x:%04x:%04x
\n
"
,
log
.
id
.
system
,
log
.
id
.
source_port
,
log
.
id
.
trigger
);
fprintf
(
stdout
,
"Timestamp %"
PRIu64
"s %"
PRIu32
"tick %"
PRIu32
"frac
\n
"
,
log
.
ts
.
seconds
,
log
.
ts
.
ticks
,
log
.
ts
.
frac
);
fprintf
(
stdout
,
"----
\n
"
);
...
...
@@ -59,7 +60,7 @@ int main(int argc, char *argv[])
uint32_t
dev_id
=
0
;
char
c
;
while
((
c
=
getopt
(
argc
,
argv
,
"hD:n:s
c:
"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"hD:n:s"
))
!=
-
1
)
{
switch
(
c
)
{
default:
help
();
...
...
@@ -73,9 +74,6 @@ int main(int argc, char *argv[])
case
's'
:
share
=
1
;
break
;
case
'c'
:
sscanf
(
optarg
,
"%d"
,
&
chan
);
break
;
}
}
...
...
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