diff options
author | Jesse Gilles <jgilles@multitech.com> | 2014-03-03 11:41:51 -0600 |
---|---|---|
committer | Jesse Gilles <jgilles@multitech.com> | 2014-03-03 11:41:51 -0600 |
commit | d2e6587292ac4c6fac7b744209e6a82f8a028dde (patch) | |
tree | 2c7347b9a1a8dfb74f5d8e083336ec2aae87ffb8 /src/eeprom_main.c | |
parent | 32e1c6c9c8f122271d6ece1ed68c6994809daa3e (diff) | |
download | mts-id-eeprom-d2e6587292ac4c6fac7b744209e6a82f8a028dde.tar.gz mts-id-eeprom-d2e6587292ac4c6fac7b744209e6a82f8a028dde.tar.bz2 mts-id-eeprom-d2e6587292ac4c6fac7b744209e6a82f8a028dde.zip |
add capa-clear option, remove unimplemented capa option0.2.1
Diffstat (limited to 'src/eeprom_main.c')
-rw-r--r-- | src/eeprom_main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/eeprom_main.c b/src/eeprom_main.c index a86b567..6ffc018 100644 --- a/src/eeprom_main.c +++ b/src/eeprom_main.c @@ -300,7 +300,7 @@ static void usage(FILE *out) { fprintf(out, " --capa-adc |\n"); fprintf(out, " --capa-wifi |\n"); fprintf(out, " --capa-bluetooth |\n"); - fprintf(out, " --capa <capa> |\n"); + fprintf(out, " --capa-clear (clears all flags) |\n"); fprintf(out, " --out-format { bin | yaml (default) } |\n"); fprintf(out, " --update |\n"); fprintf(out, " --daughter-card\n"); @@ -325,7 +325,7 @@ enum { CMD_OPT_CAPA_ADC, CMD_OPT_CAPA_WIFI, CMD_OPT_CAPA_BLUETOOTH, - CMD_OPT_CAPA, + CMD_OPT_CAPA_CLEAR, CMD_OPT_OUT_FORMAT, CMD_OPT_UPDATE, CMD_OPT_DAUGHTER_CARD, @@ -351,7 +351,7 @@ static struct option long_options[] = { {"capa-adc", 0, NULL, CMD_OPT_CAPA_ADC}, {"capa-wifi", 0, NULL, CMD_OPT_CAPA_WIFI}, {"capa-bluetooth", 0, NULL, CMD_OPT_CAPA_BLUETOOTH}, - {"capa", 1, NULL, CMD_OPT_CAPA}, + {"capa-clear", 0, NULL, CMD_OPT_CAPA_CLEAR}, {"out-format", 1, NULL, CMD_OPT_OUT_FORMAT}, {"update", 0, NULL, CMD_OPT_UPDATE}, {"daughter-card", 0, NULL, CMD_OPT_DAUGHTER_CARD}, @@ -554,9 +554,8 @@ int main(int argc, char *argv[]) { DEVICE_CAPA_SET(id_eeprom.capa, CAPA_BLUETOOTH); break; - case CMD_OPT_CAPA: - log_error("capa option not implemented"); - exit(1); + case CMD_OPT_CAPA_CLEAR: + memset(id_eeprom.capa, 0, sizeof(id_eeprom.capa)); break; case CMD_OPT_OUT_FORMAT: |