Re: Gives Bus error in memcpy() in coping /dev/fb0 to a file.
From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2007-03-08 13:04:15
On Wed, 2007-03-07 at 17:20 +0530, Vishal Soni wrote:
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
I don't think vfb's framebuffer can be mmapped. It's fixable, but nobody seems to have a need for it, yet. Tony ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV