common/console.c: Format with clang-format
BRANCH=none
TEST=none
@@ -151,18 +151,10 @@ static const struct console_command *find_command(char *name)
return match;
}
-
static const char *const errmsgs[] = {
- "OK",
- "Unknown error",
- "Unimplemented",
- "Overflow",
- "Timeout",
- "Invalid argument",
- "Busy",
- "Access Denied",
- "Not Powered",
- "Not Calibrated",
+ "OK", "Unknown error", "Unimplemented", "Overflow",
+ "Timeout", "Invalid argument", "Busy", "Access Denied",
+ "Not Powered", "Not Calibrated",
};
/**
@@ -380,8 +372,7 @@ static void handle_backspace(void)
/* Print and move anything following the cursor position */
if (input_pos != input_len) {
ccputs(input_buf + input_pos);
- memmove(input_buf + input_pos - 1,
- input_buf + input_pos,
+ memmove(input_buf + input_pos - 1, input_buf + input_pos,
input_len - input_pos + 1);
} else {
input_buf[input_len - 1] = '\0';
@@ -544,8 +535,8 @@ static void console_handle_char(int c)
/* Save command in history buffer */
if (input_len) {
save_history();
- history_next = (history_next + 1) %
- CONFIG_CONSOLE_HISTORY;
+ history_next =
+ (history_next + 1) % CONFIG_CONSOLE_HISTORY;
history_pos = history_next;
}
#endif
@@ -715,16 +706,15 @@ static int command_help(int argc, char **argv)
#ifdef CONFIG_CONSOLE_COMMAND_FLAGS
ccputs("Command Flags Description\n");
for (i = 0; i < ncmds; i++) {
- ccprintf(" %-14s %x %s\n",
- __cmds[i].name, __cmds[i].flags,
- __cmds[i].help);
+ ccprintf(" %-14s %x %s\n", __cmds[i].name,
+ __cmds[i].flags, __cmds[i].help);
cflush();
}
#else
ccputs("Known commands:\n");
for (i = 0; i < ncmds; i++) {
- ccprintf(" %-15s%s\n",
- __cmds[i].name, __cmds[i].help);
+ ccprintf(" %-15s%s\n", __cmds[i].name,
+ __cmds[i].help);
cflush();
}
#endif
@@ -771,8 +761,7 @@ static int command_help(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(help, command_help,
- "[ list | <name> ]",
+DECLARE_SAFE_CONSOLE_COMMAND(help, command_help, "[ list | <name> ]",
"Print command help");
#ifdef CONFIG_CONSOLE_HISTORY
@@ -788,7 +777,6 @@ static int command_history(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(history, command_history,
- NULL,
+DECLARE_SAFE_CONSOLE_COMMAND(history, command_history, NULL,
"Print console history");
#endif
