strange problem with /dev/isdninfo

From: Joern Heissler (joern@heissler.de)
Date: Wed Mar 21 2001 - 07:53:40 EST


Hello!
I'm new to the Mailinglist.

I've got a strange problem with /dev/isdninfo:

joern:~# cat /dev/isdninfo
idmap: Hisax...
chmap: 0 1 ...
foo
bar
phone: ??? ??? ...

--> cat /dev/isdninfo works :-)

Here's the problem:

joern:~# cat <<EOF >cat2.c
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char **argv)
{
        char buf[500];
        int fd;

        if(argc!=2) {
                return(1);
        }
        fd=open(argv[1],O_RDONLY);
        write(1,buf,read(fd,buf,200));
        return(0);
}
EOF
joern:~# gcc -o cat2 -Wall -ansi cat2.c
joern:~# ./cat2 /dev/urandom ---> 200 bytes of random characters. works :-)
joern:~# ./cat2 /dev/isdninfo ---> nothing.

joern:~# strace ./cat2 /dev/isdninfo
...
open("/dev/isdninfo", O_RDONLY) = 3
read(3, "", 200) = 0
write(1, "", 0) = 0
_exit(0) = ?

Could someone please tell me what's wrong? I (and some other people) do not understand this.
Thanks in advance!



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:15 EST