Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha
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
FMC ADC 100M 14b 4cha
Commits
65a535b8
Commit
65a535b8
authored
Jul 29, 2021
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:tools: limit input parameters
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
bc573969
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
fau-calibration.c
software/tools/fau-calibration.c
+14
-0
No files found.
software/tools/fau-calibration.c
View file @
65a535b8
...
...
@@ -18,6 +18,7 @@
#include <fmc-adc-100m14b4cha.h>
#define MAX_OPT_NR 5
static
char
options
[]
=
"hf:o:D:b"
;
static
void
fau_calibration_help
(
void
)
...
...
@@ -156,6 +157,19 @@ int main(int argc, char *argv[])
int
show_bin
=
0
,
write
=
0
;
struct
fa_calib
calib
;
if
(
argc
<=
0
)
{
fprintf
(
stderr
,
"What is going on here?
\n
"
);
exit
(
EXIT_FAILURE
);
}
if
(
argc
>
MAX_OPT_NR
)
{
fprintf
(
stderr
,
"This program accepts no more that %d arguments, you provides %d
\n
"
,
MAX_OPT_NR
,
argc
);
fau_calibration_help
();
exit
(
EXIT_FAILURE
);
}
while
((
c
=
getopt
(
argc
,
argv
,
options
))
!=
-
1
)
{
switch
(
c
)
{
default:
...
...
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