Lines Matching refs:hdt_cli
127 hdt_cli.mode = mode; in set_mode()
130 hdt_cli.mode = mode; in set_mode()
131 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_HDT); in set_mode()
138 hdt_cli.mode = mode; in set_mode()
139 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_PXE); in set_mode()
142 hdt_cli.mode = mode; in set_mode()
143 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_KERNEL); in set_mode()
146 hdt_cli.mode = mode; in set_mode()
147 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_SYSLINUX); in set_mode()
150 hdt_cli.mode = mode; in set_mode()
151 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_VESA); in set_mode()
154 hdt_cli.mode = mode; in set_mode()
155 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_PCI); in set_mode()
158 hdt_cli.mode = mode; in set_mode()
159 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_CPU); in set_mode()
166 hdt_cli.mode = mode; in set_mode()
167 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_DMI); in set_mode()
170 hdt_cli.mode = mode; in set_mode()
171 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_DISK); in set_mode()
178 hdt_cli.mode = mode; in set_mode()
179 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_VPD); in set_mode()
182 hdt_cli.mode = mode; in set_mode()
183 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_MEMORY); in set_mode()
186 hdt_cli.mode = mode; in set_mode()
187 snprintf(hdt_cli.prompt, sizeof(hdt_cli.prompt), "%s> ", CLI_ACPI); in set_mode()
198 find_cli_mode_descr(hdt_cli.mode, ¤t_mode); in set_mode()
200 if (current_mode == NULL && hdt_cli.mode != EXIT_MODE) { in set_mode()
202 more_printf("!!! BUG: Mode '%d' unknown.\n", hdt_cli.mode); in set_mode()
751 if (hdt_cli.mode != EXIT_MODE) { in reset_prompt()
752 printf("%s", hdt_cli.prompt); in reset_prompt()
754 hdt_cli.cursor_pos = 0; in reset_prompt()
789 more_printf("%s%s\n", hdt_cli.prompt, commands[i]); in start_auto_mode()
809 if (i == hdt_cli.history_pos) { in print_history()
810 more_printf("*%d:'%s'\n", i, hdt_cli.history[i]); in print_history()
813 if (strlen(hdt_cli.history[i]) == 0) in print_history()
815 more_printf(" %d:'%s'\n", i, hdt_cli.history[i]); in print_history()
828 hdt_cli.cursor_pos = 0; in start_cli_mode()
829 memset(hdt_cli.history, 0, sizeof(hdt_cli.history)); in start_cli_mode()
830 hdt_cli.history_pos = 1; in start_cli_mode()
831 hdt_cli.max_history_pos = 1; in start_cli_mode()
835 find_cli_mode_descr(hdt_cli.mode, ¤t_mode); in start_cli_mode()
838 more_printf("!!! BUG: Mode '%d' unknown.\n", hdt_cli.mode); in start_cli_mode()
851 while (hdt_cli.mode != EXIT_MODE) { in start_cli_mode()
875 memset(&INPUT[hdt_cli.cursor_pos], 0, in start_cli_mode()
876 strlen(INPUT) - hdt_cli.cursor_pos); in start_cli_mode()
885 if (hdt_cli.cursor_pos > 0) { in start_cli_mode()
887 hdt_cli.cursor_pos--; in start_cli_mode()
892 if (hdt_cli.cursor_pos < (int)strlen(INPUT)) { in start_cli_mode()
894 hdt_cli.cursor_pos++; in start_cli_mode()
902 if ((strlen(INPUT) - hdt_cli.cursor_pos) > 0) { in start_cli_mode()
904 move_cursor_right(strlen(INPUT) - hdt_cli.cursor_pos); in start_cli_mode()
905 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
913 if (hdt_cli.cursor_pos > 0) { in start_cli_mode()
915 move_cursor_left(hdt_cli.cursor_pos); in start_cli_mode()
916 hdt_cli.cursor_pos = 0; in start_cli_mode()
933 if (strlen(hdt_cli.history[future_history_pos]) == 0) { in start_cli_mode()
941 strlcpy(INPUT, hdt_cli.history[future_history_pos], sizeof(INPUT)); in start_cli_mode()
951 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
967 if (strlen(hdt_cli.history[future_history_pos]) == 0) in start_cli_mode()
971 if (future_history_pos == hdt_cli.max_history_pos) in start_cli_mode()
982 strlcpy(INPUT, hdt_cli.history[future_history_pos], sizeof(INPUT)); in start_cli_mode()
992 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
1005 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
1016 printf("%s%s", hdt_cli.prompt, INPUT); in start_cli_mode()
1027 hdt_cli.history_pos++; in start_cli_mode()
1030 if (hdt_cli.history_pos > MAX_HISTORY_SIZE) { in start_cli_mode()
1032 hdt_cli.history_pos = 1; in start_cli_mode()
1042 future_history_pos = hdt_cli.history_pos; in start_cli_mode()
1043 if (hdt_cli.history_pos > hdt_cli.max_history_pos) in start_cli_mode()
1044 hdt_cli.max_history_pos = hdt_cli.history_pos; in start_cli_mode()
1054 if (hdt_cli.cursor_pos >= strlen(INPUT)) in start_cli_mode()
1057 for (int c = hdt_cli.cursor_pos; c < (int)strlen(INPUT) - 1; c++) in start_cli_mode()
1065 printf("%s", INPUT + hdt_cli.cursor_pos); in start_cli_mode()
1068 if (strlen(INPUT + hdt_cli.cursor_pos) > 0) in start_cli_mode()
1069 move_cursor_left(strlen(INPUT + hdt_cli.cursor_pos)); in start_cli_mode()
1075 if (hdt_cli.cursor_pos == 0) in start_cli_mode()
1078 for (int c = hdt_cli.cursor_pos - 1; in start_cli_mode()
1090 printf("%s", INPUT + hdt_cli.cursor_pos - 1); in start_cli_mode()
1093 hdt_cli.cursor_pos--; in start_cli_mode()
1094 move_cursor_to_column(strlen(hdt_cli.prompt) + hdt_cli.cursor_pos + in start_cli_mode()
1109 if (hdt_cli.cursor_pos > MAX_LINE_SIZE - 2) in start_cli_mode()
1112 if (hdt_cli.cursor_pos < (int)strlen(INPUT)) { in start_cli_mode()
1114 int trailing_chars = strlen(INPUT) - hdt_cli.cursor_pos; in start_cli_mode()
1116 strlcpy(temp_command, INPUT, hdt_cli.cursor_pos); in start_cli_mode()
1120 INPUT + hdt_cli.cursor_pos, trailing_chars); in start_cli_mode()
1128 printf("%s", INPUT + hdt_cli.cursor_pos); in start_cli_mode()
1135 INPUT[hdt_cli.cursor_pos] = current_key; in start_cli_mode()
1137 hdt_cli.cursor_pos++; in start_cli_mode()