[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
error in reading frame-buffer device
dear friends
i want to open /dev/fb* for doing ioctl on it
my problem is open always returns -1
what may be the reason ??
the code is given below
one more observation if i try to use "cp" on /dev/fb[0-7]
system says that /dev/fb1 : no such device but "ls" shows its
there
ex.
[root $] cp /dev/fb1 ~shubh/frameb
cp : /dev/fb1 : no such device
the code of the program is as following
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
int main()
{
int fbfd = 0;
fbfd = open("/dev/fb0", O_RDWR);
if (fbfd<0) {
printf("Error: cannot open framebuffer device.\n");
printf("%d",fbfd) /***** this prints -1 *******/
exit(1);
}
printf("The framebuffer device was opened successfully.\n");
close(fbfd);
return 0;
}
TIA
shubh
REC-Surat
--------------------------
@>
i love /( )\ linux
^ ^
--------------------------