From 9ac237040247f08e1232fec2ddc66f8220586183 Mon Sep 17 00:00:00 2001 From: Carsten Paeth Date: Wed, 8 Mar 2000 13:40:33 +0000 Subject: [PATCH] check for /dev/isdn/capi20 if /dev/capi20 doesn't exist. --- avmb1/avmcapictrl.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/avmb1/avmcapictrl.c b/avmb1/avmcapictrl.c index 16010c25..22dec649 100644 --- a/avmb1/avmcapictrl.c +++ b/avmb1/avmcapictrl.c @@ -6,6 +6,9 @@ * Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de) * * $Log$ + * Revision 1.14 2000/01/28 16:36:19 calle + * generic addcard (call add_card function of named driver) + * * Revision 1.13 1999/12/06 17:01:51 calle * more documentation and possible errors explained. * @@ -75,6 +78,9 @@ /* new ioctls */ #include +static char capidevname[] = "/dev/capi20"; +static char capidevnamenew[] = "/dev/isdn/capi20"; + char *cmd; char *ctrldev; int arg_ofs; @@ -357,11 +363,12 @@ int main(int argc, char **argv) } else usage(); ac = argc - (arg_ofs - 1); - fd = open("/dev/capi20", O_RDWR); + if ((fd = open(capidevname, O_RDWR)) < 0 && errno == ENOENT) + fd = open(capidevnamenew, O_RDWR); if (fd < 0) { switch (errno) { case ENOENT: - perror("Device file /dev/capi20 missing, use instdev"); + perror("Device file /dev/capi20 and /dev/isdn/capi20 missing, use instdev"); exit(2); case ENODEV: perror("device capi20 not registered");