nmhw21,26: fix incorrect indentation
This commit is contained in:
parent
e0f24ed684
commit
e2bf817634
|
|
@ -1356,9 +1356,9 @@ static int check_break_length(int time, bool rx_line)
|
||||||
duration += RESET_CHECK_PERIOD;
|
duration += RESET_CHECK_PERIOD;
|
||||||
|
|
||||||
if (duration == DURATION_FACTORY_RESET) {
|
if (duration == DURATION_FACTORY_RESET) {
|
||||||
/* Indicate factory reset threshold */
|
/* Indicate factory reset threshold */
|
||||||
blink_led(1);
|
blink_led(1);
|
||||||
}
|
}
|
||||||
else if (duration == DURATION_RECOVERY_BOOT) {
|
else if (duration == DURATION_RECOVERY_BOOT) {
|
||||||
/* Indicate recovery boot threshold and leave state */
|
/* Indicate recovery boot threshold and leave state */
|
||||||
blink_led(2);
|
blink_led(2);
|
||||||
|
|
@ -1473,10 +1473,10 @@ static int check_break_command(int time, int has_input, int c)
|
||||||
state = DONE;
|
state = DONE;
|
||||||
}
|
}
|
||||||
else if (c == 'r') {
|
else if (c == 'r') {
|
||||||
blink_led(2);
|
blink_led(2);
|
||||||
act = RECOVERY_BOOT;
|
act = RECOVERY_BOOT;
|
||||||
state = DONE;
|
state = DONE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Unknown command */
|
/* Unknown command */
|
||||||
act = NONE;
|
act = NONE;
|
||||||
|
|
@ -1486,7 +1486,7 @@ static int check_break_command(int time, int has_input, int c)
|
||||||
|
|
||||||
if (wait_time > 0) {
|
if (wait_time > 0) {
|
||||||
wait_time -= RESET_CHECK_PERIOD;
|
wait_time -= RESET_CHECK_PERIOD;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* puts("character timeout\n"); */
|
/* puts("character timeout\n"); */
|
||||||
act = NONE;
|
act = NONE;
|
||||||
|
|
@ -1565,23 +1565,23 @@ static void check_reset_button(void)
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case FACTORY_RESET: {
|
case FACTORY_RESET: {
|
||||||
char new_bootargs[512];
|
char new_bootargs[512];
|
||||||
char *bootargs = getenv("bootargs");
|
char *bootargs = getenv("bootargs");
|
||||||
|
|
||||||
puts("Do factory reset during boot...\n");
|
puts("Do factory reset during boot...\n");
|
||||||
|
|
||||||
if (bootargs == 0) bootargs = "";
|
if (bootargs == 0) bootargs = "";
|
||||||
strncpy(new_bootargs, bootargs, sizeof(new_bootargs));
|
strncpy(new_bootargs, bootargs, sizeof(new_bootargs));
|
||||||
strncat(new_bootargs, " factory-reset", sizeof(new_bootargs));
|
strncat(new_bootargs, " factory-reset", sizeof(new_bootargs));
|
||||||
|
|
||||||
setenv("bootargs", new_bootargs);
|
setenv("bootargs", new_bootargs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case RECOVERY_BOOT:
|
case RECOVERY_BOOT:
|
||||||
puts("Booting recovery image...\n");
|
puts("Booting recovery image...\n");
|
||||||
|
|
||||||
setenv("bootcmd", "run recovery");
|
setenv("bootcmd", "run recovery");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue