/[gxemul]/trunk/src/devices/dev_fbctrl.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_fbctrl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_fbctrl.c,v 1.5 2006/12/30 13:30:58 debug Exp $   *  $Id: dev_fbctrl.c,v 1.6 2007/06/15 19:11:15 debug Exp $
29     *
30     *  COMMENT: Framebuffer controller device (control's dev_fb in test machines)
31   *   *
32   *  A "framebuffer control" device. It can be used to manipulate the   *  A "framebuffer control" device. It can be used to manipulate the
33   *  framebuffer device in testmachines.   *  framebuffer device in testmachines.
# Line 36  Line 38 
38  #include <string.h>  #include <string.h>
39    
40  #include "cpu.h"  #include "cpu.h"
 #include "cpu_mips.h"  
41  #include "device.h"  #include "device.h"
42  #include "devices.h"  #include "devices.h"
43  #include "machine.h"  #include "machine.h"
# Line 155  DEVINIT(fbctrl) Line 156  DEVINIT(fbctrl)
156  {  {
157          struct fbctrl_data *d;          struct fbctrl_data *d;
158    
159          d = malloc(sizeof(struct fbctrl_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct fbctrl_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
160          memset(d, 0, sizeof(struct fbctrl_data));          memset(d, 0, sizeof(struct fbctrl_data));
161    
162          d->vfb_data = dev_fb_init(devinit->machine, devinit->machine->memory,          d->vfb_data = dev_fb_init(devinit->machine, devinit->machine->memory,

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26