From patchwork Thu May 2 21:46:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 2513921 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by patchwork1.kernel.org (Postfix) with ESMTP id 058413FCA5 for ; Thu, 2 May 2013 21:50:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r42Lm3H7021124; Thu, 2 May 2013 17:48:03 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r42Ll2YE028954 for ; Thu, 2 May 2013 17:47:02 -0400 Received: from ether.msp.redhat.com (ether.msp.redhat.com [10.15.80.119]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r42Ll1uL010749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 May 2013 17:47:02 -0400 Received: from ether.msp.redhat.com (localhost.localdomain [127.0.0.1]) by ether.msp.redhat.com (8.14.1/8.14.1) with ESMTP id r42Ll0SP009059; Thu, 2 May 2013 16:47:00 -0500 Received: (from bmarzins@localhost) by ether.msp.redhat.com (8.14.1/8.14.1/Submit) id r42LkxrB009058; Thu, 2 May 2013 16:46:59 -0500 From: Benjamin Marzinski To: device-mapper development Date: Thu, 2 May 2013 16:46:35 -0500 Message-Id: <1367531197-8987-15-git-send-email-bmarzins@redhat.com> In-Reply-To: <1367531197-8987-1-git-send-email-bmarzins@redhat.com> References: <1367531197-8987-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-loop: dm-devel@redhat.com Cc: Christophe Varoqui Subject: [dm-devel] [PATCH 14/16] Stop annoying prio_lookup warning messages X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Multipath shouldn't try to look up its prioritizer if it doesn't have one. Doing so just causes annoying warning messages. Signed-off-by: Benjamin Marzinski --- libmultipath/prio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmultipath/prio.c b/libmultipath/prio.c index 8e6b93e..186cc4d 100644 --- a/libmultipath/prio.c +++ b/libmultipath/prio.c @@ -162,7 +162,10 @@ void prio_put (struct prio * dst) if (!dst) return; - src = prio_lookup(dst->name); + if (!strlen(dst->name)) + src = NULL; + else + src = prio_lookup(dst->name); memset(dst, 0x0, sizeof(struct prio)); free_prio(src); }