From patchwork Tue Jan 8 13:53:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 1946061 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by patchwork2.kernel.org (Postfix) with ESMTP id 041A4DF23A for ; Tue, 8 Jan 2013 13:58:04 +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 r08Dtl4B019798; Tue, 8 Jan 2013 08:55:47 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r08DsWi9004605 for ; Tue, 8 Jan 2013 08:54:32 -0500 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r08DsWHL016765 for ; Tue, 8 Jan 2013 08:54:32 -0500 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r08DsVX4016447 for ; Tue, 8 Jan 2013 08:54:31 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 36232A51F6; Tue, 8 Jan 2013 14:54:28 +0100 (CET) From: Hannes Reinecke To: Christophe Varoqui Date: Tue, 8 Jan 2013 14:53:49 +0100 Message-Id: <1357653259-62650-12-git-send-email-hare@suse.de> In-Reply-To: <1357653259-62650-1-git-send-email-hare@suse.de> References: <1357653259-62650-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.299 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 11/42] Checker name is not displayed on failure 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 If add_checker() isn't able to locate the checker it won't display the name in free_checker(). Signed-off-by: Hannes Reinecke --- libmultipath/prio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libmultipath/prio.c b/libmultipath/prio.c index cf97fad..8e6b93e 100644 --- a/libmultipath/prio.c +++ b/libmultipath/prio.c @@ -86,6 +86,7 @@ struct prio * add_prio (char * name) p = alloc_prio(); if (!p) return NULL; + snprintf(p->name, PRIO_NAME_LEN, "%s", name); snprintf(libname, LIB_PRIO_NAMELEN, "%s/libprio%s.so", conf->multipath_dir, name); if (stat(libname,&stbuf) < 0) { @@ -107,7 +108,6 @@ struct prio * add_prio (char * name) condlog(0, "A dynamic linking error occurred: (%s)", errstr); if (!p->getprio) goto out; - snprintf(p->name, PRIO_NAME_LEN, "%s", name); list_add(&p->node, &prioritizers); return p; out: