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

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

revision 4 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_le.c,v 1.39 2005/03/14 19:14:02 debug Exp $   *  $Id: dev_le.c,v 1.40 2005/06/26 11:43:48 debug Exp $
29   *     *  
30   *  LANCE ethernet, as used in DECstations.   *  LANCE ethernet, as used in DECstations.
31   *   *
# Line 768  void dev_le_init(struct machine *machine Line 768  void dev_le_init(struct machine *machine
768          uint64_t buf_start, uint64_t buf_end, int irq_nr, int len)          uint64_t buf_start, uint64_t buf_end, int irq_nr, int len)
769  {  {
770          char *name2;          char *name2;
771            size_t nlen = 55;
772          struct le_data *d = malloc(sizeof(struct le_data));          struct le_data *d = malloc(sizeof(struct le_data));
773    
774          if (d == NULL) {          if (d == NULL) {
# Line 818  void dev_le_init(struct machine *machine Line 819  void dev_le_init(struct machine *machine
819              SRAM_SIZE, dev_le_sram_access, (void *)d,              SRAM_SIZE, dev_le_sram_access, (void *)d,
820              MEM_BINTRANS_OK | MEM_BINTRANS_WRITE_OK, d->sram);              MEM_BINTRANS_OK | MEM_BINTRANS_WRITE_OK, d->sram);
821    
822          name2 = malloc(50);          name2 = malloc(nlen);
823          if (name2 == NULL) {          if (name2 == NULL) {
824                  fprintf(stderr, "out of memory in dev_le_init()\n");                  fprintf(stderr, "out of memory in dev_le_init()\n");
825                  exit(1);                  exit(1);
826          }          }
827          sprintf(name2, "le [%02x:%02x:%02x:%02x:%02x:%02x]",          snprintf(name2, nlen, "le [%02x:%02x:%02x:%02x:%02x:%02x]",
828              d->rom[0], d->rom[1], d->rom[2], d->rom[3], d->rom[4], d->rom[5]);              d->rom[0], d->rom[1], d->rom[2], d->rom[3], d->rom[4], d->rom[5]);
829    
830          memory_device_register(mem, name2, baseaddr + 0x100000,          memory_device_register(mem, name2, baseaddr + 0x100000,

Legend:
Removed from v.4  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26