Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Simple VME FMC Carrier SVEC - Software
Commits
9c4aa8fe
Commit
9c4aa8fe
authored
May 16, 2013
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svec: fix non-terminated SVEC ID string
parent
552c7fde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
svec-drv.c
kernel/svec-drv.c
+3
-1
No files found.
kernel/svec-drv.c
View file @
9c4aa8fe
...
...
@@ -144,7 +144,7 @@ int svec_is_bootloader_active(struct svec_dev *svec)
{
struct
device
*
dev
=
svec
->
dev
;
uint32_t
idc
;
char
*
buf
=
(
char
*
)
&
idc
;
char
buf
[
5
]
;
void
*
addr
;
/* Check if CS/CSR window is mapped */
...
...
@@ -159,6 +159,8 @@ int svec_is_bootloader_active(struct svec_dev *svec)
idc
=
be32_to_cpu
(
ioread32
(
addr
));
idc
=
htonl
(
idc
);
strncpy
(
buf
,
(
char
*
)
&
idc
,
4
);
buf
[
4
]
=
0
;
if
(
strncmp
(
buf
,
"SVEC"
,
4
)
==
0
)
{
dev_info
(
dev
,
"IDCode value %x [%s].
\n
"
,
idc
,
buf
);
/* Bootloader active. Unlocked */
...
...
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