Friday, 13 September 2013

what wrong in this code?

what wrong in this code?

hello I want to know what wrong I did here
using header file
soundcard.h
int ctl=-1;
ctl=open("/dev/late_display/control",
O_RDWR);
if(ctl==-1)
{
perror("error to open control");
close(ctl);
return -1;
}
if(ioctl(ctl,SNDCTL_SEQ_SYNC,0)<0)
{
perror("failed to get control info");
close(ctl);
return -1;
}
out strace :
open("/dev/late_display/control",
O_RDWR|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
write(2, "error to open control", 21) = 21
write(2, ": ", 2) = 2
write(2, "No such file or directory", 25) = 25
write(2, "\n", 1) = 1
close(-1) = -1
EBADF (Bad file descriptor)
os environment is android and file exist in the dev/late_display/* folder

No comments:

Post a Comment