Skip to contentSkip to conversation

Cluster Project branch, master, updated. gfs-kernel_0_1_22-192-g73c8dfb

Cluster-devel [email protected] 1 participant 1 message Apr 22, 2008

lore
Share & tools
lore
#0 lore raw

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=73c8dfbd5a5b1440ba31de983a95dd5c900747c6

The branch, master has been updated

       via  73c8dfbd5a5b1440ba31de983a95dd5c900747c6 (commit)
       via  0dcc8ce541c2fe776fb91c30635a90b737f7d30f (commit)
      from  acfe61e4b1edc65b69416ac06964a0831b50b50d (commit)

Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.

- Log ----------------------------------------------------------------- commit 73c8dfbd5a5b1440ba31de983a95dd5c900747c6

Author: Fabio M. Di Nitto <[email protected]>
Date:   Tue Apr 22 12:23:05 2008 +0200

[CCS] Convert to logsys

commit 0dcc8ce541c2fe776fb91c30635a90b737f7d30f

Author: Fabio M. Di Nitto <[email protected]>
Date:   Tue Apr 22 12:12:38 2008 +0200

[CCS] libraries should never log

-----------------------------------------------------------------------

Summary of changes:

 ccs/common/log.c         |   23 ---
 ccs/common/log.h         |   98 -------------
 ccs/daemon/Makefile      |    3 +-
 ccs/daemon/ccsd.c        |  179 +++++++++++++-----------
 ccs/daemon/cluster_mgr.c |  114 ++++++++--------
 ccs/daemon/cnx_mgr.c     |  338 +++++++++++++++++++++++-----------------------
 ccs/daemon/misc.c        |   30 +++--
 ccs/include/debug.h      |   11 +-
 ccs/lib/Makefile         |   11 +-
 ccs/lib/libccs.c         |   53 +-------
 10 files changed, 351 insertions(+), 509 deletions(-)
 delete mode 100644 ccs/common/log.c
 delete mode 100644 ccs/common/log.h
ccs/common/log.c deleted +0 -23
deleted file mode 100644
index a9c70f1..0000000
@@ -1,23 +0,0 @@
-/******************************************************************************
-*******************************************************************************
-**
-**  Copyright (C) 2004 Red Hat, Inc.  All rights reserved.
-**  
-**  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 General Public License v.2.
-**
-*******************************************************************************
-******************************************************************************/
-#include <syslog.h>
-
-int log_is_open = 0;
-
-void log_open(const char *ident, int option, int facility){
-  openlog(ident, option, facility);
-  log_is_open = 1;
-}
-
-void log_close(void){
-  log_is_open = 0;
-}
ccs/common/log.h deleted +0 -98

98 lines not on this page · raw message

ccs/daemon/Makefile +2 -1
index c4a862d..e41aec5 100644
@@ -29,11 +29,12 @@ OBJS=	ccsd.o \
 	globals.o
 
 CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-CFLAGS += -I${cmanincdir} `xml2-config --cflags`
+CFLAGS += -I${cmanincdir} `xml2-config --cflags` -I${openaisincdir}
 CFLAGS += -I$(S) -I$(S)/../include -I$(S)/../common
 CFLAGS += -I${incdir}
 
 LDFLAGS += -L${cmanlibdir} -lcman -L${ccslibdir} -lccs
+LDFLAGS += -L${openaislibdir} -llogsys
 LDFLAGS += -L${libdir} `xml2-config --libs` -lpthread
 
 
ccs/daemon/ccsd.c +97 -82

535 lines not on this page · raw message

ccs/daemon/cluster_mgr.c +58 -56

376 lines not on this page · raw message

ccs/daemon/cnx_mgr.c +170 -168

1,009 lines not on this page · raw message

ccs/daemon/misc.c +16 -14
index 6907268..54b94ef 100644
@@ -28,9 +28,9 @@
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
+#include <openais/service/logsys.h>
 
 #include "comm_headers.h"
-#include "log.h"
 #include "debug.h"
 #include "misc.h"
 
@@ -41,6 +41,8 @@ pthread_mutex_t update_lock;
 
 open_doc_t *master_doc = NULL;
 
+LOGSYS_DECLARE_SUBSYS ("CCS", LOG_INFO);
+
 int get_doc_version(xmlDocPtr ldoc){
   int i;
   int error = 0;
@@ -48,38 +50,38 @@ int get_doc_version(xmlDocPtr ldoc){
   xmlXPathContextPtr ctx = NULL;
   xmlNodePtr        node = NULL;
 
-  ENTER("get_doc_version");
+  CCSENTER("get_doc_version");
 
   ctx = xmlXPathNewContext(ldoc);
   if(!ctx){
-    log_err("Error: unable to create new XPath context.\n");
+    log_printf(LOG_ERR, "Error: unable to create new XPath context.\n");
     error = -EIO;  /* ATTENTION -- what should this be? */
     goto fail;
   }
 
   obj = xmlXPathEvalExpression((xmlChar *)"//cluster/@config_version", ctx);
   if(!obj || !obj->nodesetval || (obj->nodesetval->nodeNr != 1)){
-    log_err("Error while retrieving config_version.\n");
+    log_printf(LOG_ERR, "Error while retrieving config_version.\n");
     error = -ENODATA;
     goto fail;
   }
 
   node = obj->nodesetval->nodeTab[0];
   if(node->type != XML_ATTRIBUTE_NODE){
-    log_err("Object returned is not of attribute type.\n");
+    log_printf(LOG_ERR, "Object returned is not of attribute type.\n");
     error = -ENODATA;
     goto fail;
   }
 
   if(!node->children->content || !strlen((char *)node->children->content)){
-    log_dbg("No content found.\n");
+    log_printf(LOG_DEBUG, "No content found.\n");
     error = -ENODATA;
     goto fail;
   }
   
   for(i=0; i < strlen((char *)node->children->content); i++){
     if(!isdigit(node->children->content[i])){
-      log_err("config_version is not a valid integer.\n");
+      log_printf(LOG_ERR, "config_version is not a valid integer.\n");
       error = -EINVAL;
       goto fail;
     }
@@ -94,7 +96,7 @@ fail:
   if(obj){
     xmlXPathFreeObject(obj);
   }
-  EXIT("get_doc_version");
+  CCSEXIT("get_doc_version");
   return error;
 }
 
@@ -114,31 +116,31 @@ char *get_cluster_name(xmlDocPtr ldoc){
   xmlXPathContextPtr ctx = NULL;
   xmlNodePtr        node = NULL;
 
-  ENTER("get_cluster_name");
+  CCSENTER("get_cluster_name");
 
   ctx = xmlXPathNewContext(ldoc);
   if(!ctx){
-    log_err("Error: unable to create new XPath context.\n");
+    log_printf(LOG_ERR, "Error: unable to create new XPath context.\n");
     error = -EIO;  /* ATTENTION -- what should this be? */
     goto fail;
   }
 
   obj = xmlXPathEvalExpression((xmlChar *)"//cluster/@name", ctx);
   if(!obj || !obj->nodesetval || (obj->nodesetval->nodeNr != 1)){
-    log_err("Error while retrieving config_version.\n");
+    log_printf(LOG_ERR, "Error while retrieving config_version.\n");
     error = -ENODATA;
     goto fail;
   }
 
   node = obj->nodesetval->nodeTab[0];
   if(node->type != XML_ATTRIBUTE_NODE){
-    log_err("Object returned is not of attribute type.\n");
+    log_printf(LOG_ERR, "Object returned is not of attribute type.\n");
     error = -ENODATA;
     goto fail;
   }
 
   if(!node->children->content || !strlen((char *)node->children->content)){
-    log_dbg("No content found.\n");
+    log_printf(LOG_DEBUG, "No content found.\n");
     error = -ENODATA;
     goto fail;
   }
@@ -153,7 +155,7 @@ fail:
   if(obj){
     xmlXPathFreeObject(obj);
   }
-  EXIT("get_cluster_name");
+  CCSEXIT("get_cluster_name");
   return rtn;
 }
 
ccs/include/debug.h +3 -8
index 176ab48..49af319 100644
@@ -1,7 +1,7 @@
 /******************************************************************************
 *******************************************************************************
 **
-**  Copyright (C) 2004 Red Hat, Inc.  All rights reserved.
+**  Copyright (C) 2004-2008 Red Hat, Inc.  All rights reserved.
 **
 **  This copyrighted material is made available to anyone wishing to use,
 **  modify, copy, or redistribute it subject to the terms and conditions
@@ -13,12 +13,7 @@
 #ifndef __DEBUG_DOT_H__
 #define __DEBUG_DOT_H__
 
-#ifdef DEBUG
-#define ENTER(x) log_dbg("Entering %s\n", x)
-#define EXIT(x) log_dbg("Exiting %s\n", x)
-#else
-#define ENTER(x)
-#define EXIT(x)
-#endif
+#define CCSENTER(x) log_printf(LOG_DEBUG, "Entering " x "\n")
+#define CCSEXIT(x) log_printf(LOG_DEBUG, "Exiting " x "\n")
 
 #endif /* __DEBUG_DOT_H__ */
ccs/lib/Makefile +3 -8
index 63d32f0..820342f 100644
@@ -1,7 +1,7 @@
 ###############################################################################
 ###############################################################################
 ##
-##  Copyright (C) 2004 Red Hat, Inc.  All rights reserved.
+##  Copyright (C) 2004-2008 Red Hat, Inc.  All rights reserved.
 ##
 ##  This copyrighted material is made available to anyone wishing to use,
 ##  modify, copy, or redistribute it subject to the terms and conditions
@@ -23,12 +23,11 @@ include $(OBJDIR)/make/clean.mk
 include $(OBJDIR)/make/install.mk
 include $(OBJDIR)/make/uninstall.mk
 
-OBJS=	libccs.o \
-	log.o
+OBJS=	libccs.o
 
 CFLAGS += -D_FILE_OFFSET_BITS=64
 CFLAGS += -fPIC
-CFLAGS += -I$(S)/../include -I$(S)/../common
+CFLAGS += -I$(S)/../include
 CFLAGS += -I${incdir}
 
 
@@ -36,10 +35,6 @@ ${TARGET}: ${OBJS}
 	${AR} cr $@ $^
 	${RANLIB} $@
 
-log.c:
-	ln -sf $(S)/../common/log.c log.c
-
 clean: generalclean
-	rm -rf ccs.h.gch log.c
 
 -include $(OBJS:.o=.d)
ccs/lib/libccs.c +2 -51

274 lines not on this page · raw message

hooks/post-receive
--
Cluster Project