This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
master - ccs: turn more ccs_tool code into legacy code
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Thu, 7 Aug 2008 04:32:59 +0000 (UTC)
- Subject: master - ccs: turn more ccs_tool code into legacy code
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=abdd841250d0a81aeacfe3735cb55d6a4e8d0727
Commit: abdd841250d0a81aeacfe3735cb55d6a4e8d0727
Parent: 3049d1173834e0916ae25182f9d4fec626042d17
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Thu Aug 7 06:31:51 2008 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
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 <fdinitto@redhat.com>
---
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 <errno.h>
#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 <libxml/tree.h>
+#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);