From owner-svn-src-head@FreeBSD.ORG Fri Aug 22 15:34:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAFCEB34; Fri, 22 Aug 2014 15:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD021309C; Fri, 22 Aug 2014 15:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MFYur2006107; Fri, 22 Aug 2014 15:34:56 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MFYuHd006106; Fri, 22 Aug 2014 15:34:56 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408221534.s7MFYuHd006106@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Fri, 22 Aug 2014 15:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270337 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:34:57 -0000 Author: royger Date: Fri Aug 22 15:34:56 2014 New Revision: 270337 URL: http://svnweb.freebsd.org/changeset/base/270337 Log: netback: remove dead code Remove the xen_net_read_mac function since it's not used anymore. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netback/netback.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Fri Aug 22 15:16:41 2014 (r270336) +++ head/sys/dev/xen/netback/netback.c Fri Aug 22 15:34:56 2014 (r270337) @@ -152,7 +152,6 @@ static void xnb_attach_failed(struct xnb static int xnb_shutdown(struct xnb_softc *xnb); static int create_netdev(device_t dev); static int xnb_detach(device_t dev); -static int xen_net_read_mac(device_t dev, uint8_t mac[]); static int xnb_ifmedia_upd(struct ifnet *ifp); static void xnb_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr); static void xnb_intr(void *arg); @@ -2467,42 +2466,6 @@ xnb_ifinit(void *xsc) mtx_unlock(&xnb->sc_lock); } - -/** - * Read the 'mac' node at the given device's node in the store, and parse that - * as colon-separated octets, placing result the given mac array. mac must be - * a preallocated array of length ETHER_ADDR_LEN ETH_ALEN (as declared in - * net/ethernet.h). - * Return 0 on success, or errno on error. - */ -static int -xen_net_read_mac(device_t dev, uint8_t mac[]) -{ - char *s, *e, *macstr; - const char *path; - int error = 0; - int i; - - path = xenbus_get_node(dev); - error = xs_read(XST_NIL, path, "mac", NULL, (void **) &macstr); - if (error != 0) { - xenbus_dev_fatal(dev, error, "parsing %s/mac", path); - } else { - s = macstr; - for (i = 0; i < ETHER_ADDR_LEN; i++) { - mac[i] = strtoul(s, &e, 16); - if (s == e || (e[0] != ':' && e[0] != 0)) { - error = ENOENT; - break; - } - s = &e[1]; - } - free(macstr, M_XENBUS); - } - return error; -} - - /** * Callback used by the generic networking code to tell us when our carrier * state has changed. Since we don't have a physical carrier, we don't care