Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bpm-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
bpm
bpm-sw
Commits
278201e3
Commit
278201e3
authored
Nov 09, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/dev_io/dev_io*: fix rookie mistake of missing break on case
parent
8db32b93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
dev_io.c
src/dev_io/dev_io.c
+3
-2
dev_io_cfg.c
src/dev_io/dev_io_cfg.c
+3
-2
No files found.
src/dev_io/dev_io.c
View file @
278201e3
...
...
@@ -224,12 +224,13 @@ int main (int argc, char *argv[])
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_INFO
,
"[dev_io] Dev_id parameter was not set.
\n
"
"
\t
Defaulting it to the /dev file number ...
\n
"
);
int
matches
=
sscanf
(
dev_entry
,
"/dev/fpga%u"
,
&
dev_id
);
int
matches
=
sscanf
(
dev_entry
,
"/dev/fpga
-
%u"
,
&
dev_id
);
if
(
matches
==
0
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] Dev_entry parameter is invalid.
\n
"
"
\t
It must be in the format
\"
/dev/fpga<device_number>
\"
. Exiting ...
\n
"
);
"
\t
It must be in the format
\"
/dev/fpga
-
<device_number>
\"
. Exiting ...
\n
"
);
goto
err_exit
;
}
break
;
default:
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_INFO
,
"[dev_io] Dev_id parameter was not set. Exiting ...
\n
"
);
...
...
src/dev_io/dev_io_cfg.c
View file @
278201e3
...
...
@@ -139,12 +139,13 @@ int main (int argc, char *argv[])
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_INFO
,
"[dev_io] Dev_id parameter was not set.
\n
"
"
\t
Defaulting it to the /dev file number ...
\n
"
);
int
matches
=
sscanf
(
dev_entry
,
"/dev/fpga%u"
,
&
dev_id
);
int
matches
=
sscanf
(
dev_entry
,
"/dev/fpga
-
%u"
,
&
dev_id
);
if
(
matches
==
0
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] Dev_entry parameter is invalid.
\n
"
"
\t
It must be in the format
\"
/dev/fpga<device_number>
\"
. Exiting ...
\n
"
);
"
\t
It must be in the format
\"
/dev/fpga
-
<device_number>
\"
. Exiting ...
\n
"
);
goto
err_exit
;
}
break
;
default:
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_INFO
,
"[dev_io] Dev_id parameter was not set. Exiting ...
\n
"
);
...
...
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