This commit is contained in:
John
2021-11-20 17:50:47 +01:00
parent 8370ba72b4
commit 803c2542f2
+5 -5
View File
@@ -140,7 +140,7 @@ error_t parse_opt(int key, char *arg, struct argp_state *state) {
} }
setIp = true; setIp = true;
break; break;
case 'm': case 'm': // --mask=24
if (arg == nullptr || arg[0] == 0) { if (arg == nullptr || arg[0] == 0) {
argp_error(state, "invalid IP mask"); argp_error(state, "invalid IP mask");
return EINVAL; return EINVAL;
@@ -155,20 +155,20 @@ error_t parse_opt(int key, char *arg, struct argp_state *state) {
} }
setMask = true; setMask = true;
break; break;
case 'M': case 'M': // --macip
setMacFromIp = true; setMacFromIp = true;
break; break;
case 'f': case 'f': // --flash=firmware.hex
if (arg == nullptr || arg[0] == 0 || stat(arg, &st) != 0 || !S_ISREG(st.st_mode)) { if (arg == nullptr || arg[0] == 0 || stat(arg, &st) != 0 || !S_ISREG(st.st_mode)) {
argp_error(state, "invalid flash file"); argp_error(state, "invalid flash file");
return EINVAL; return EINVAL;
} }
flashFile = arg; flashFile = arg;
break; break;
case 'r': case 'r': // --reset
reset = true; reset = true;
break; break;
case 's': case 's': // --slow
lowSpeed = true; lowSpeed = true;
break; break;
default: default: