Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ti-connected-launchpad
lm4tools_public
Commits
ca6cb63d
Commit
ca6cb63d
authored
Oct 29, 2012
by
Zygmunt Krynicki
Browse files
lm4flash.c: Add new main()
The new main function just handles argument processing and calls flasher_flash()
parent
0885e9ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
lm4flash/lm4flash.c
View file @
ca6cb63d
...
@@ -684,3 +684,31 @@ done:
...
@@ -684,3 +684,31 @@ done:
return
retval
;
return
retval
;
}
}
int
main
(
int
argc
,
char
*
argv
[])
{
const
char
*
serial
=
NULL
;
const
char
*
rom_name
=
NULL
;
int
do_verify
=
0
;
int
opt
;
while
((
opt
=
getopt
(
argc
,
argv
,
"vs:"
))
!=
-
1
)
{
switch
(
opt
)
{
case
'v'
:
do_verify
=
1
;
break
;
case
's'
:
serial
=
optarg
;
break
;
default:
flasher_usage
();
return
EXIT_FAILURE
;
}
}
if
(
optind
>=
argc
)
{
flasher_usage
();
return
EXIT_FAILURE
;
}
else
rom_name
=
argv
[
optind
];
return
flasher_flash
(
do_verify
,
serial
,
rom_name
);
}
Write
Preview
Supports
Markdown
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