Browse Source

Set dump mode according to option

When called with the -l, --load-data option, do not forget to
set the load parameter to 1.
develop
Damien Goutte-Gattat 8 years ago
parent
commit
59fbe517f7
  1. 3
      src/kmxtool.c

3
src/kmxtool.c

@ -239,7 +239,6 @@ main(int argc, char **argv)
port = NULL;
mode = MODE_STATUS;
dump.load = 0;
while ( (c = getopt_long(argc, argv, "hvp:sd:l:L",
options, NULL)) != -1 ) {
@ -313,6 +312,7 @@ main(int argc, char **argv)
unsigned char *data;
int n;
dump.load = 0;
if ( kmx_microx_parse_dump_request(param, &dump) < 0 )
errx(EXIT_FAILURE, "invalid dump request: %s", param);
@ -329,6 +329,7 @@ main(int argc, char **argv)
unsigned char *data;
ssize_t n;
dump.load = 1;
if ( kmx_microx_parse_dump_request(param, &dump) < 0 )
errx(EXIT_FAILURE, "invalid load request: %s", param);

Loading…
Cancel
Save