summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/eeprom_main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/eeprom_main.c b/src/eeprom_main.c
index e0add12..8b805b3 100644
--- a/src/eeprom_main.c
+++ b/src/eeprom_main.c
@@ -634,6 +634,7 @@ int main(int argc, char *argv[]) {
int option_index;
int tmp;
int fd;
+ int capa_clear = 0;
char *in_file = NULL;
char *out_file = "-";
char *out_format = "yaml";
@@ -918,7 +919,7 @@ int main(int argc, char *argv[]) {
break;
case CMD_OPT_CAPA_CLEAR:
- memset(id_eeprom.capa, 0, sizeof(id_eeprom.capa));
+ capa_clear = 1;
break;
case CMD_OPT_OUT_FORMAT:
@@ -952,6 +953,18 @@ int main(int argc, char *argv[]) {
}
}
+#ifdef MTCDT3B
+ if(base_board && capa_clear) {
+ memset(mtcdt3b_eeprom.capa, 0, sizeof(mtcdt3b_eeprom.capa));
+ capa_clear = 0;
+ }
+#endif
+
+ if(capa_clear) {
+ memset(id_eeprom.capa, 0, sizeof(id_eeprom.capa));
+ capa_clear = 0;
+ }
+
#define EEPROM_SET(eeprom,field) (strncpy(eeprom.field, field, sizeof(eeprom.field) - 1));