Skip to content

Commit

Permalink
owusbprobe: fix TTY device listing, filter lock/init device on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
stromnet committed Feb 15, 2016
1 parent cb80acf commit 72d3640
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/owshell/src/c/owusbprobe.c
Expand Up @@ -203,7 +203,8 @@ static int list_tty_devices(dev_info **out_list_head) {

while((e = readdir(d)) != NULL) {
#if defined(__FreeBSD__)
if(!strncmp(e->d_name, "cua", 3))
if(!strncmp(e->d_name, "cua", 3) &&
!strstr(e->d_name, ".init") && !strstr(e->d_name, ".lock"))
#elif defined(__APPLE__)
if(!strncmp(e->d_name, "cu.", 3))
#else
Expand All @@ -214,6 +215,7 @@ static int list_tty_devices(dev_info **out_list_head) {
return -1;

snprintf((char*)curr->tty_name, sizeof(curr->tty_name), "/dev/%s", e->d_name);
i++;
}
}

Expand Down

0 comments on commit 72d3640

Please sign in to comment.