FreeCalypso > hg > freecalypso-tools
view rvinterf/etmsync/simplemain.c @ 505:7bf0d909c87e
fc-loadtool flash ID check: change of reset after the check logic
This change only affects those flash configurations that have ID checks
enabled. The logic for resetting the flash after the ID check has been
changed as follows:
1) If the check fails, we return without attempting to reset the flash.
2) If the check is successful, we reset the flash using the configured
method (could be AMD or Intel or Intel W30) instead of always doing an
AMD flash reset as the original code did.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 27 May 2019 19:58:01 +0000 |
parents | e40bb5a6c6b9 |
children |
line wrap: on
line source
/* * This module contains the main() function for simple etmsync programs * that execute a single operation without a command dispatcher. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "exitcodes.h" extern char *socket_pathname; extern char *rvinterf_ttyport, *rvinterf_Bopt, *rvinterf_lopt, *rvinterf_wopt; main(argc, argv) char **argv; { extern int optind; extern char *optarg; int c, sopt = 0; while ((c = getopt(argc, argv, "B:l:p:s:w:")) != EOF) switch (c) { case 'B': rvinterf_Bopt = optarg; continue; case 'l': rvinterf_lopt = optarg; continue; case 'p': rvinterf_ttyport = optarg; continue; case 's': socket_pathname = optarg; sopt++; continue; case 'w': rvinterf_wopt = optarg; continue; case '?': default: /* error msg already printed */ exit(ERROR_USAGE); } if (rvinterf_ttyport) { if (sopt) { fprintf(stderr, "%s error: -p and -s options are mutually exclusive\n", argv[0]); exit(ERROR_USAGE); } launch_rvinterf(1); } else { if (rvinterf_Bopt || rvinterf_lopt || rvinterf_wopt) { fprintf(stderr, "%s error: -B, -l and -w options are meaningful only when launching rvinterf\n", argv[0]); exit(ERROR_USAGE); } connect_local_socket(); } return single_op_main(argc - optind, argv + optind); }