Fixing baisc test for s390x machines
This commit is contained in:
parent
6399fb0d94
commit
ff888df66c
1 changed files with 5 additions and 2 deletions
|
|
@ -23,7 +23,10 @@ int main() {
|
|||
}
|
||||
|
||||
while ((entry = readdir(dp))) {
|
||||
if (strncmp(entry->d_name, "ttyS", 4) == 0) {
|
||||
if (strncmp(entry->d_name, "tty", 3) == 0 &&
|
||||
strcmp(entry->d_name, "tty") != 0 &&
|
||||
strcmp(entry->d_name, "tty0") != 0) {
|
||||
|
||||
snprintf(device, sizeof(device), "%s%s", DEVICE_PATH, entry->d_name);
|
||||
break;
|
||||
}
|
||||
|
|
@ -32,7 +35,7 @@ int main() {
|
|||
closedir(dp);
|
||||
|
||||
if (entry == NULL) {
|
||||
fprintf(stderr, "No tty device found ttyS*\n");
|
||||
fprintf(stderr, "No suitable tty device found (excluding tty and tty0)\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue