/[gxemul]/trunk/src/devices/dev_lca.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_lca.c

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

revision 41 by dpavlin, Mon Oct 8 16:22:11 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_lca.c,v 1.9 2007/04/28 09:19:52 debug Exp $   *  $Id: dev_lca.c,v 1.10 2007/06/15 19:11:15 debug Exp $
29   *   *
30   *  LCA PCI bus (for Alpha machines).   *  COMMENT: LCA PCI bus, for Alpha machines
31   */   */
32    
33  #include <stdio.h>  #include <stdio.h>
# Line 329  DEVINIT(lca) Line 329  DEVINIT(lca)
329  {  {
330          char *interrupt_path;          char *interrupt_path;
331          struct interrupt interrupt_template;          struct interrupt interrupt_template;
332          struct lca_data *d = malloc(sizeof(struct lca_data));          struct lca_data *d;
333          if (d == NULL) {  
334                  fprintf(stderr, "out of memory\n");          CHECK_ALLOCATION(d = malloc(sizeof(struct lca_data)));
                 exit(1);  
         }  
335          memset(d, 0, sizeof(struct lca_data));          memset(d, 0, sizeof(struct lca_data));
336    
337          /*  Register a PCI bus:  */          /*  Register a PCI bus:  */
# Line 365  DEVINIT(lca) Line 363  DEVINIT(lca)
363              LCA_IOC_BASE, 0x20000000, dev_lca_ioc_access, (void *)d,              LCA_IOC_BASE, 0x20000000, dev_lca_ioc_access, (void *)d,
364              DM_DEFAULT, NULL);              DM_DEFAULT, NULL);
365    
366          interrupt_path = malloc(strlen(devinit->machine->path) + 10);          CHECK_ALLOCATION(interrupt_path =
367                malloc(strlen(devinit->machine->path) + 10));
368          snprintf(interrupt_path, strlen(devinit->machine->path) + 10,          snprintf(interrupt_path, strlen(devinit->machine->path) + 10,
369              "%s.lca", devinit->machine->path);              "%s.lca", devinit->machine->path);
370    

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

  ViewVC Help
Powered by ViewVC 1.1.26