Framebuffer(/dev/fb0) is not opening in Redhat Linux and Lepton Floppy linux

Crazy Boy <[email protected]> Tue, 31 Jan 2006 07:10:36 -0800 (PST)
Newsgroups gmane.linux.fbdev.user
Message-ID <[email protected]>
Hi,
  
 First of all, I would like to thankful to you for your fast response. Please forget about yesterdays mail. In my previous mail, I did a mistake.
  
  I have one more doubt. i.e.,
  
 When I am trying to execute the below Framebuffer example program in Lepton (http://mulinux.dotsrc.org/lepton.html) linux and Redhat Linux, My program is unable to open the framebuffer device (/dev/fb0). This program is successfully running in SuSe Linux 9.3. 
 
 How can I open the framebuffer (/dev/fb0) device in Redhat or Lepton Linux?
 
 What can I do? Please show me a solution.
  
 The example program is:
  
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <linux/fb.h>
 #include <sys/mman.h>
 
 int main(void)
 {
     int fbfd,fbfd1,fbfd2;
     struct fb_var_screeninfo vinfo;
     struct fb_fix_screeninfo finfo;
 
     printf("\nReturn Values of \n\n");
 
     /* Open the file for reading and writing */
     fbfd = open("/dev/fb0", O_RDWR);
     printf("\nfbfd = %d",fbfd);    
     
     /* Get fixed screen information */
     fbfd1 = ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo); 
     printf("\n fbfd1 = %d",fbfd1);    
 
     /* Get variable screen information */
     fbfd2 = ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo); 
     printf("\nfbfd2 = %d\n",fbfd2);    
 
     printf("\n\n%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel );
 
     close(fbfd);
     return 0;
 }
 
 The output of the above program is :
 
 Return Values of
 
 fbfd = -1
 fbfd1 = -1
 fbfd2 = -1
 
 Thatmeans, Framebuffer device is not opening. So, to achieve this problem, what can I do? This is really very urgent. Please show me a solution. I will be waiting for your reply. Thank you very much for considering your valuable time for me.
  
  With regards,
  Chandra.
  

			
---------------------------------
 Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.