Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
99
Issue boards
Milestones
Wiki
Code
Merge requests
4
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
White Rabbit Switch - Software
Commits
75151459
Commit
75151459
authored
4 months ago
by
Adam Wujek
Browse files
Options
Downloads
Patches
Plain Diff
[FEATURE:
#335
] userspace/snmpd: adjustments for RISC-V as softpll
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
1059092d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/snmpd/wrsSpllStatusGroup.c
+3
-3
3 additions, 3 deletions
userspace/snmpd/wrsSpllStatusGroup.c
userspace/snmpd/wrsSpllVersionGroup.c
+5
-5
5 additions, 5 deletions
userspace/snmpd/wrsSpllVersionGroup.c
with
8 additions
and
8 deletions
userspace/snmpd/wrsSpllStatusGroup.c
+
3
−
3
View file @
75151459
...
...
@@ -42,14 +42,14 @@ time_t wrsSpllStatus_data_fill(void)
return
time_update
;
}
/* check magic number in SPLL stat memory */
if
(
spll_stats_p
->
magic
!=
SPLL_MAGIC
)
{
if
(
spll_stats_p
->
magic
!=
SPLL_
STATS_
MAGIC
)
{
/* wrong magic */
snmp_log
(
LOG_ERR
,
"SNMP: "
SL_ER
"wrsSpllStatusGroup Wrong SPLL magic number
\n
"
);
return
time_update
;
}
/* check version of SPLL's stat structure
, versions 1 and 2 are ok
*/
if
(
spll_stats_p
->
ver
<
=
4
)
{
/* check version of SPLL's stat structure */
if
(
spll_stats_p
->
ver
=
=
SPLL_STATS_VER
)
{
wrsSpllStatus_s
.
wrsSpllMode
=
spll_stats_p
->
mode
;
wrsSpllStatus_s
.
wrsSpllIrqCnt
=
spll_stats_p
->
irq_cnt
;
wrsSpllStatus_s
.
wrsSpllSeqState
=
spll_stats_p
->
seq_state
;
...
...
This diff is collapsed.
Click to expand it.
userspace/snmpd/wrsSpllVersionGroup.c
+
5
−
5
View file @
75151459
...
...
@@ -36,7 +36,7 @@ time_t wrsSpllVersion_data_fill(void)
return
time_update
;
}
/* check magic number in SPLL stat memory */
if
(
spll_stats_p
->
magic
!=
SPLL_MAGIC
)
{
if
(
spll_stats_p
->
magic
!=
SPLL_
STATS_
MAGIC
)
{
/* wrong magic */
snmp_log
(
LOG_ERR
,
"SNMP: "
SL_ER
"wrsSpllVersionGroup Wrong SPLL magic number
\n
"
);
...
...
@@ -46,13 +46,13 @@ time_t wrsSpllVersion_data_fill(void)
* version 2 */
if
(
spll_stats_p
->
ver
<=
4
)
{
int
len
;
strncpy
_e
(
wrsSpllVersion_s
.
wrsSpllVersion
,
spll_stats_p
->
commit_id
,
32
);
strncpy
(
wrsSpllVersion_s
.
wrsSpllVersion
,
spll_stats_p
->
build_id
.
commit_id
,
32
);
/* concatenate date and time */
strncpy
_e
(
wrsSpllVersion_s
.
wrsSpllBuildDate
,
spll_stats_p
->
build_date
,
16
);
strncpy
(
wrsSpllVersion_s
.
wrsSpllBuildDate
,
spll_stats_p
->
build_
id
.
build_
date
,
16
);
len
=
strnlen
(
wrsSpllVersion_s
.
wrsSpllBuildDate
,
32
);
wrsSpllVersion_s
.
wrsSpllBuildDate
[
len
]
=
' '
;
/* put space instead of null */
/* add time after added space at the end of string */
strncpy
_e
(
&
wrsSpllVersion_s
.
wrsSpllBuildDate
[
len
+
1
],
spll_stats_p
->
build_time
,
16
-
1
);
strncpy
(
&
wrsSpllVersion_s
.
wrsSpllBuildDate
[
len
+
1
],
spll_stats_p
->
build_
id
.
build_
time
,
16
-
1
);
}
else
{
...
...
@@ -63,7 +63,7 @@ time_t wrsSpllVersion_data_fill(void)
}
/* buil_by was introduced in version 3 */
if
(
spll_stats_p
->
ver
>=
3
)
{
strncpy
_e
(
wrsSpllVersion_s
.
wrsSpllBuildBy
,
spll_stats_p
->
build_by
,
32
);
strncpy
(
wrsSpllVersion_s
.
wrsSpllBuildBy
,
spll_stats_p
->
build_
id
.
build_
by
,
32
);
}
/* there was an update, return current time */
...
...
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