Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha
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
1
Merge Requests
1
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
FMC TDC 1ns 5cha
Commits
85bca307
Commit
85bca307
authored
Oct 05, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sW:lib: save device ID
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
daba3b67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
fmctdc-lib.c
lib/fmctdc-lib.c
+3
-2
No files found.
lib/fmctdc-lib.c
View file @
85bca307
...
...
@@ -107,9 +107,10 @@ struct fmctdc_board *fmctdc_open(int dev_id)
if
(
!
b
)
return
NULL
;
b
->
dev_id
=
dev_id
;
/* get sysfs */
snprintf
(
path
,
sizeof
(
path
),
"/sys/bus/zio/devices/tdc-1n5c-%04x"
,
dev_id
);
"/sys/bus/zio/devices/tdc-1n5c-%04x"
,
b
->
dev_id
);
ret
=
stat
(
path
,
&
sb
);
if
(
ret
<
0
)
goto
err_stat_s
;
...
...
@@ -119,7 +120,7 @@ struct fmctdc_board *fmctdc_open(int dev_id)
/* get dev */
snprintf
(
path
,
sizeof
(
path
),
"/dev/zio/tdc-1n5c-%04x-0-0-ctrl"
,
dev_id
);
"/dev/zio/tdc-1n5c-%04x-0-0-ctrl"
,
b
->
dev_id
);
ret
=
stat
(
path
,
&
sb
);
if
(
ret
<
0
)
goto
err_stat_d
;
...
...
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