--- ./alevt-cap.c.tv 2002-08-20 05:17:29.000000000 +0200 +++ ./alevt-cap.c 2002-10-29 10:54:21.000000000 +0100 @@ -2,6 +2,7 @@ #include <stdlib.h> #include <signal.h> #include <unistd.h> +#include <sys/stat.h> #include "vt.h" #include "misc.h" @@ -204,6 +205,10 @@ struct req *req; struct dl_head reqs[2]; // simple linear lists of requests & captures + struct stat statbuf; + if (stat(vbi_name, &statbuf) == -1) + vbi_name = "/dev/v4l/vbi0"; + setprgname(argv[0]); fdset_init(fds); --- ./alevt-date.c.tv 2002-10-29 10:54:09.000000000 +0100 +++ ./alevt-date.c 2002-10-29 10:54:09.000000000 +0100 @@ -2,6 +2,7 @@ #include <sys/time.h> #include <time.h> /* to keep glibc 2.2 quiet */ #include <stdlib.h> +#include <sys/stat.h> #include <unistd.h> #include <signal.h> #include <time.h> @@ -173,6 +174,10 @@ int opt, ind; char *arg; + struct stat statbuf; + if (stat(vbi_name, &statbuf) == -1) + vbi_name = "/dev/v4l/vbi0"; + setprgname(argv[0]); ind = 1; --- ./main.c.tv 2002-08-20 05:07:04.000000000 +0200 +++ ./main.c 2002-10-29 10:54:09.000000000 +0100 @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <sys/stat.h> #include "vt.h" #include "misc.h" @@ -162,6 +163,10 @@ int opt, ind; char *arg; + struct stat statbuf; + if (stat(vbi_name, &statbuf) == -1) + vbi_name = "/dev/v4l/vbi0"; + setprgname(argv[0]); fdset_init(fds);