Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
afcdad6e
Commit
afcdad6e
authored
Sep 18, 2020
by
Alessio Netti
Browse files
Minor changes to SysFS "retain" option
parent
6d296707
Changes
1
Hide whitespace changes
Inline
Side-by-side
dcdbpusher/sensors/sysfs/SysfsSensorGroup.cpp
View file @
afcdad6e
...
...
@@ -85,9 +85,10 @@ void SysfsSensorGroup::read() {
LOG
(
error
)
<<
"Error opening file "
<<
_path
<<
":"
<<
strerror
(
errno
);
return
;
}
}
else
{
fseek
(
_file
,
0
,
SEEK_SET
);
}
fseek
(
_file
,
0
,
SEEK_SET
);
size_t
nelem
=
fread
(
buf
,
1
,
1024
,
_file
);
reading
.
timestamp
=
getTimestamp
();
...
...
@@ -133,4 +134,5 @@ void SysfsSensorGroup::read() {
void
SysfsSensorGroup
::
printGroupConfig
(
LOG_LEVEL
ll
,
unsigned
int
leadingSpaces
)
{
std
::
string
leading
(
leadingSpaces
,
' '
);
LOG_VAR
(
ll
)
<<
leading
<<
"File path: "
<<
_path
;
LOG_VAR
(
ll
)
<<
leading
<<
"Retain: "
<<
(
_retain
?
"true"
:
"false"
);
}
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