]> Zhao Yanbai Git Server - minix.git/commitdiff
Removed unused code in the ethernet driver that was left from an old implementation
authorKees van Reeuwijk <reeuwijk@few.vu.nl>
Wed, 20 Jan 2010 17:02:55 +0000 (17:02 +0000)
committerKees van Reeuwijk <reeuwijk@few.vu.nl>
Wed, 20 Jan 2010 17:02:55 +0000 (17:02 +0000)
Removed/rewritten the use of uninitialized variables in error messages.

servers/inet/mnx_eth.c
servers/vm/exec.c
servers/vm/i386/pagetable.c

index 9da1f0ddccde710d07ec46c1d179f55bbfcd1007..2f9055095c3dcba5500e3dd2bb467162f304e894 100644 (file)
@@ -145,8 +145,6 @@ PUBLIC void osdep_eth_init()
                        }
                }
 
-               r= ENXIO;
-                       
                sr_add_minor(if2minor(ecp->ec_ifno, ETH_DEV_OFF),
                        i, eth_open, eth_close, eth_read, 
                        eth_write, eth_ioctl, eth_cancel, eth_select);
@@ -156,13 +154,6 @@ PUBLIC void osdep_eth_init()
                eth_port->etp_vlan_port= NULL;
                eth_port->etp_wr_pack= 0;
                eth_port->etp_rd_pack= 0;
-               if (r == OK)
-               {
-                       eth_port->etp_ethaddr= *(ether_addr_t *)mess.m3_ca1;
-                       printf("osdep_eth_init: setting EPF_GOT_ADDR\n");
-                       eth_port->etp_flags |= EPF_GOT_ADDR;
-                       setup_read (eth_port);
-               }
        }
 
        /* And now come the VLANs */
index 264550cb9d8aa9cd1e4564f7932d051f9c764b69..3c92acd7ccabc21405da8ca35dc2997323fb5525 100644 (file)
@@ -281,7 +281,7 @@ SANITYCHECK(SCL_DETAIL);
                        /* We secretly know that making a new pagetable
                         * in the same slot if one was there will never fail.
                         */
-                               vm_panic("new_mem: pt_new failed", s);
+                               vm_panic("new_mem: pt_new failed", ENOMEM);
                        }
                        rmp->vm_flags |= VMF_HASPT;
                        SANITYCHECK(SCL_DETAIL);
index f7fe853335589c5deb4639e8678a361fb263e06d..c3d8c0d5ec618fc5fe1ed9e9dd057011c8aa3640 100644 (file)
@@ -328,7 +328,7 @@ PUBLIC void *vm_allocpage(phys_bytes *phys, int reason)
        if((r=pt_writemap(pt, loc, *phys, I386_PAGE_SIZE,
                I386_VM_PRESENT | I386_VM_USER | I386_VM_WRITE, 0)) != OK) {
                FREE_MEM(newpage, CLICKSPERPAGE);
-               printf("vm_allocpage writemap failed\n", ret);
+               printf("vm_allocpage writemap failed\n");
                level--;
                return NULL;
        }