t40c term[] count fix
. term[] did not have the promised number of entries Change-Id: I06a45ca0d948a6876bf1bffd0ec4706c88b7a3b0
This commit is contained in:
parent
1f6e0c8fa6
commit
4ac7206c6f
1 changed files with 2 additions and 1 deletions
|
@ -42,10 +42,11 @@ void open_terminal(int *child_fd, int *parent_fd) {
|
|||
char opentermw[5+OPEN_MAX+1];
|
||||
char opentermr[5+OPEN_MAX+1];
|
||||
char *term[] = {"f","e","d","c","b","a","9","8","7","6","5","4","3","2","1"};
|
||||
#define TERMS (sizeof(term)/sizeof(term[0]))
|
||||
|
||||
if (!child_fd || !parent_fd) exit(EXIT_FAILURE);
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
for (i = 0; i < TERMS; i++) {
|
||||
snprintf(opentermw, 5+OPEN_MAX, "/dev/ttyp%s", term[i]);
|
||||
snprintf(opentermr, 5+OPEN_MAX, "/dev/ptyp%s", term[i]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue