Thread (7 messages) 7 messages, 3 authors, 2007-03-09

Gives Bus error in memcpy() in coping /dev/fb0 to a file.

From: Vishal Soni <hidden>
Date: 2007-03-07 11:50:44

hello,

I am trying to get the snapshot of the screen through a c program by mmaping
the framebuffer device /dev/fb0 .
For this i compiled kernel with virtual framebuffer support and passing
vga=791 as boot line argument.

Though i am able to get snapshot by
[root@tw pcapp]# cat /dev/fb0 > frame

and see it on the screen by
[root@tw pcapp]# cat frame > /dev/fb0

But when i try to capture the frame buffer using the below c code, It gives
bus error @ memcpy()

Output :::::::::

[root@tw pcapp]# ./pcapp
1024x768, 16bpp
framebuffer device mapped to memory @ 0xb7db3000.
FB_FRAME mapped to memory @ 0xb7c33000.
Bus error
[root@tw pcapp]#

Any pointers plz !!!!!
Vishal

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help