From owner-svn-src-head@freebsd.org Mon Sep 21 10:27:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0950FA05135; Mon, 21 Sep 2015 10:27:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.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 EE4541589; Mon, 21 Sep 2015 10:27:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8LARUdB053607; Mon, 21 Sep 2015 10:27:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8LARUWe053606; Mon, 21 Sep 2015 10:27:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509211027.t8LARUWe053606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 21 Sep 2015 10:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288061 - head/usr.sbin/ctld 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.20 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: Mon, 21 Sep 2015 10:27:31 -0000 Author: mav Date: Mon Sep 21 10:27:30 2015 New Revision: 288061 URL: https://svnweb.freebsd.org/changeset/base/288061 Log: Make cltd ignore HA ports. Modified: head/usr.sbin/ctld/kernel.c Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Mon Sep 21 10:24:34 2015 (r288060) +++ head/usr.sbin/ctld/kernel.c Mon Sep 21 10:27:30 2015 (r288061) @@ -119,6 +119,7 @@ struct cctl_lun { struct cctl_port { uint32_t port_id; + char *port_frontend; char *port_name; int pp; int vp; @@ -331,7 +332,10 @@ cctl_end_pelement(void *user_data, const devlist->cur_sb[devlist->level] = NULL; devlist->level--; - if (strcmp(name, "port_name") == 0) { + if (strcmp(name, "frontend_type") == 0) { + cur_port->port_frontend = str; + str = NULL; + } else if (strcmp(name, "port_name") == 0) { cur_port->port_name = str; str = NULL; } else if (strcmp(name, "physical_port") == 0) { @@ -506,6 +510,8 @@ retry_port: name = NULL; STAILQ_FOREACH(port, &devlist.port_list, links) { + if (strcmp(port->port_frontend, "ha") == 0) + continue; if (name) free(name); if (port->pp == 0 && port->vp == 0)