Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 2015 10:49:48 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r288785 - stable/10/usr.sbin/ctld
Message-ID:  <201510051049.t95AnmB1073674@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Oct  5 10:49:47 2015
New Revision: 288785
URL: https://svnweb.freebsd.org/changeset/base/288785

Log:
  MFC r288061: Make cltd ignore HA ports.

Modified:
  stable/10/usr.sbin/ctld/kernel.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/ctld/kernel.c
==============================================================================
--- stable/10/usr.sbin/ctld/kernel.c	Mon Oct  5 10:49:01 2015	(r288784)
+++ stable/10/usr.sbin/ctld/kernel.c	Mon Oct  5 10:49:47 2015	(r288785)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510051049.t95AnmB1073674>