Error while opennig device file
Dustin Lang
dalang at cs.ubc.ca
Thu Jun 16 04:16:41 EST 2005
Also - does it work from the command line? Do both mknod commands work?
When you "ls -l /dev/test{1,2}" , what do you get? What happens when you
"cat /dev/test1" or "echo > /dev/test1" ?
Cheers,
dstn.
>> I'm sorry but this is a "copy to mail" error.
>> Here is the right code:
>>
>> ret_val = system("mknod -m 777 /dev/test1 c 122 1");
>> ret_val = system("mknod -m 777 /dev/test2 c 122 2");
>>
>> file_desc1 = open("/dev/test1", O_RDWR);
>> file_desc2 = open("/dev/test2", O_RDWR);
More information about the Linuxppc-dev
mailing list