From b10489f56887203cd4dbb7064824e70042c95617 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 28 Feb 2012 18:23:56 +0000 Subject: [PATCH] Invert some return codes (which used to get ignored anyway) in cases when lvmetad is not being used. --- lib/cache/lvmetad.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index 695cbed70..ef2c09775 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2012 Red Hat, Inc. + * + * This file is part of LVM2. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License v.2.1. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + #include "lib.h" #include "toolcontext.h" #include "metadata.h" @@ -360,7 +374,7 @@ int lvmetad_pv_list_to_lvmcache(struct cmd_context *cmd) struct dm_config_node *cn; if (!_using_lvmetad) - return_0; + return 1; reply = daemon_send_simple(_lvmetad, "pv_list", NULL); @@ -388,7 +402,7 @@ int lvmetad_vg_list_to_lvmcache(struct cmd_context *cmd) struct dm_config_node *cn; if (!_using_lvmetad) - return_0; + return 1; reply = daemon_send_simple(_lvmetad, "vg_list", NULL); if (reply.error || strcmp(daemon_reply_str(reply, "response", ""), "OK")) { @@ -678,4 +692,3 @@ fatal: "It is strongly recommended that you restart lvmetad immediately."); return 0; } -