Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
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
Software for White Rabbit PTP Core
Commits
58c1938c
Commit
58c1938c
authored
Feb 15, 2017
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: print version in wrpc-dump
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
2b3cc5e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
Makefile
Makefile
+2
-0
Makefile
tools/Makefile
+2
-1
wrpc-dump.c
tools/wrpc-dump.c
+7
-2
No files found.
Makefile
View file @
58c1938c
...
...
@@ -114,6 +114,8 @@ OUTPUT := $(OUTPUT-y)
GIT_VER
=
$(
shell
git describe
--always
--dirty
|
sed
's;^wr-switch-sw-;;'
)
GIT_USR
=
$(
shell
git config
--get-all
user.name
)
export
GIT_VER
export
GIT_USR
# if user.name is not available from git use user@hostname
ifeq
($(GIT_USR),)
...
...
tools/Makefile
View file @
58c1938c
...
...
@@ -45,7 +45,8 @@ sdb-wrpc.bin: sdbfs
wrpc-dump
:
wrpc-dump.c dump-info-host.o
$(CC)
$(CFLAGS)
-I
../ppsi/include
-I
../ppsi/arch-wrpc/include
\
-I
../softpll
\
$^
-o
$@
$^
-o
$@
\
-D__GIT_VER__
=
"
\"
$(GIT_VER)
\"
"
-D__GIT_USR__
=
"
\"
$(GIT_USR)
\"
"
pfilter-builder
:
pfilter-builder.c
$(CC)
$(CFLAGS)
-include
../include/generated/autoconf.h
\
...
...
tools/wrpc-dump.c
View file @
58c1938c
...
...
@@ -217,7 +217,11 @@ unsigned long wrpc_get_pointer(void *base, char *s_name, char *f_name)
return
0
;
}
void
print_version
(
void
)
{
fprintf
(
stderr
,
"Built in wrpc-sw repo ver:%s, by %s on %s %s
\n
"
,
__GIT_VER__
,
__GIT_USR__
,
__TIME__
,
__DATE__
);
}
/* all of these are 0 by default */
unsigned
long
spll_off
,
fifo_off
,
ppi_off
,
ppg_off
,
servo_off
,
ds_off
;
...
...
@@ -237,7 +241,8 @@ int main(int argc, char **argv)
fprintf
(
stderr
,
"
\"
name
\"
is one of pll, fifo, ppg, ppi, servo_state"
" or ds for data-sets.
\"
ds
\"
gets a ppg offset
\n
"
);
fprintf
(
stderr
,
"But with a new binary, just pass <file>
\n
"
);
fprintf
(
stderr
,
"But with a new binary, just pass <file>
\n\n
"
);
print_version
();
exit
(
1
);
}
...
...
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