| 61 | size_t progress_full; /* How many chars to write to fill the progress bar. */ |
| 62 | |
| 63 | void memtest_progress_start(char *title, int pass) { |
| 64 | int j; |
| 65 | |
| 66 | printf("\x1b[H\x1b[2J"); /* Cursor home, clear screen. */ |
| 67 | /* Fill with dots. */ |
| 68 | for (j = 0; j < ws.ws_col*(ws.ws_row-2); j++) printf("."); |
| 69 | printf("Please keep the test running several minutes per GB of memory.\n"); |
| 70 | printf("Also check http://www.memtest86.com/ and http://pyropus.ca/software/memtester/"); |
| 71 | printf("\x1b[H\x1b[2K"); /* Cursor home, clear current line. */ |
| 72 | printf("%s [%d]\n", title, pass); /* Print title. */ |
| 73 | progress_printed = 0; |
| 74 | progress_full = (size_t)ws.ws_col*(ws.ws_row-3); |
| 75 | fflush(stdout); |
| 76 | } |
| 77 | |
| 78 | void memtest_progress_end(void) { |
| 79 | printf("\x1b[H\x1b[2J"); /* Cursor home, clear screen. */ |
no test coverage detected