From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23206 invoked by alias); 7 Aug 2008 04:34:06 -0000 Received: (qmail 23200 invoked by alias); 7 Aug 2008 04:34:06 -0000 X-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: master - ccs: turn more ccs_tool code into legacy code To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3049d1173834e0916ae25182f9d4fec626042d17 X-Git-Newrev: abdd841250d0a81aeacfe3735cb55d6a4e8d0727 From: "Fabio M. Di Nitto" Message-Id: <20080807043259.1BD5312003F@lists.fedorahosted.org> Date: Thu, 07 Aug 2008 07:16:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00218.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=abdd841250d0a81aeacfe3735cb55d6a4e8d0727 Commit: abdd841250d0a81aeacfe3735cb55d6a4e8d0727 Parent: 3049d1173834e0916ae25182f9d4fec626042d17 Author: Fabio M. Di Nitto AuthorDate: Thu Aug 7 06:31:51 2008 +0200 Committer: Fabio M. Di Nitto CommitterDate: Thu Aug 7 06:31:51 2008 +0200 ccs: turn more ccs_tool code into legacy code the update functionality connects to ccsd that is now legacy code. filter this out when build normal ccs_tool. Signed-off-by: Fabio M. Di Nitto --- ccs/ccs_tool/Makefile | 7 +++++-- ccs/ccs_tool/ccs_tool.c | 2 +- ccs/ccs_tool/editconf.c | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ccs/ccs_tool/Makefile b/ccs/ccs_tool/Makefile index 8359a9e..5d6aa5f 100644 --- a/ccs/ccs_tool/Makefile +++ b/ccs/ccs_tool/Makefile @@ -16,10 +16,13 @@ include $(OBJDIR)/make/clean.mk include $(OBJDIR)/make/install.mk include $(OBJDIR)/make/uninstall.mk -OBJS= ccs_tool.o \ - update.o \ +OBJS = ccs_tool.o \ editconf.o +ifdef legacy_code +OBJS += update.o +endif + CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS += -I${cmanincdir} `xml2-config --cflags` CFLAGS += -I${ccsincdir} -I$(S)/../include diff --git a/ccs/ccs_tool/ccs_tool.c b/ccs/ccs_tool/ccs_tool.c index 9963f0d..c05a07e 100644 --- a/ccs/ccs_tool/ccs_tool.c +++ b/ccs/ccs_tool/ccs_tool.c @@ -5,9 +5,9 @@ #include #include "copyright.cf" -#include "update.h" #include "editconf.h" #ifdef LEGACY_CODE +#include "update.h" #include "libccscompat.h" #else #include "ccs.h" diff --git a/ccs/ccs_tool/editconf.c b/ccs/ccs_tool/editconf.c index 2194279..53b0ed6 100644 --- a/ccs/ccs_tool/editconf.c +++ b/ccs/ccs_tool/editconf.c @@ -11,7 +11,9 @@ #include +#ifdef LEGACY_CODE #include "update.h" +#endif #define MAX_NODES 256 @@ -226,6 +228,7 @@ static void save_file(xmlDoc *doc, struct option_info *ninfo) } } +#ifdef LEGACY_CODE /* Try to tell ccsd if needed */ if ((strcmp(ninfo->configfile, ninfo->outputfile) == 0 && ninfo->tell_ccsd) || ninfo->force_ccsd) @@ -233,6 +236,7 @@ static void save_file(xmlDoc *doc, struct option_info *ninfo) printf("running ccs_tool update...\n"); update(ninfo->outputfile); } +#endif /* free the document */ xmlFreeDoc(doc);