Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: lrm by sunjd from ([email protected])
2. Linux-HA CVS: lib by davidlee from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Thu, 24 Nov 2005 03:27:02 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lrm by sunjd from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : sunjd
Host :
Project : linux-ha
Module : lrm
Dir : linux-ha/lrm/lrmd
Modified Files:
lrmd.c
Log Message:
add a log output function for level2 debug
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/lrmd/lrmd.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -3 -r1.187 -r1.188
--- lrmd.c 17 Nov 2005 10:32:56 -0000 1.187
+++ lrmd.c 24 Nov 2005 10:27:01 -0000 1.188
@@ -1,4 +1,4 @@
-/* $Id: lrmd.c,v 1.187 2005/11/17 10:32:56 sunjd Exp $ */
+/* $Id: lrmd.c,v 1.188 2005/11/24 10:27:01 sunjd Exp $ */
/*
* Local Resource Manager Daemon
*
@@ -79,10 +79,14 @@
cl_log(priority, fmt); \
#define lrmd_debug(priority, fmt...); \
- if ( debug_level >= 1 ) { \
+ if ( debug_level == 1 ) { \
cl_log(priority, fmt); \
}
+#define lrmd_debug2(priority, fmt...); \
+ if ( debug_level >= 2 ) { \
+ cl_log(priority, fmt); \
+ }
#define lrmd_nullcheck(p) ((p) ? (p) : "<null>")
#define lrm_str(p) (lrmd_nullcheck(p))
@@ -442,7 +446,7 @@
}
memset(op->first_line_ra_stdout, 0, sizeof(op->first_line_ra_stdout));
- lrmd_debug(LOG_DEBUG, "lrmd_op_destroy: free the op whose address is %p"
+ lrmd_debug2(LOG_DEBUG, "lrmd_op_destroy: free the op whose address is
%p"
, op);
cl_free(op);
}
@@ -1626,7 +1630,7 @@
return FALSE;
}
- lrmd_debug(LOG_DEBUG
+ lrmd_debug2(LOG_DEBUG
, "%s: remove an operation %s from the repeat operation list and "
"add it to the operation list."
, __FUNCTION__, op_info(op));
@@ -2578,8 +2582,8 @@
}
op->t_done = time_longclock();
- lrmd_debug(LOG_DEBUG, "on_op_done: %s", op_info(op));
- lrmd_debug(LOG_DEBUG
+ lrmd_debug2(LOG_DEBUG, "on_op_done: %s", op_info(op));
+ lrmd_debug2(LOG_DEBUG
,"TimeStamp: Recv:%ld,Add to List:%ld,Perform:%ld, Done %ld"
,longclockto_ms(op->t_recv)
,longclockto_ms(op->t_addtolist)
@@ -2769,7 +2773,7 @@
on_repeat_op_readytorun, repeat_op);
rsc->repeat_op_list =
g_list_append (rsc->repeat_op_list, repeat_op);
- lrmd_debug(LOG_DEBUG
+ lrmd_debug2(LOG_DEBUG
, "on_op_done:repeat %s is added to repeat op list to wait"
, op_info(op));
@@ -2817,7 +2821,7 @@
}
if (NULL == rsc->op_list) {
- lrmd_debug(LOG_DEBUG,"perform_op: no op to perform");
+ lrmd_debug2(LOG_DEBUG,"perform_op: no op to perform");
return HA_OK;
}
@@ -3018,7 +3022,7 @@
/* Name of the resource and some others also
* need to be passed in. Maybe pass through the
* entire lrm_op_t too? */
- lrmd_debug(LOG_DEBUG
+ lrmd_debug2(LOG_DEBUG
, "perform_ra_op:call RA plugin to perform %s,
pid: [%d]"
, op_info(op), getpid());
RAExec->execra (rsc->id,
@@ -3056,7 +3060,7 @@
CHECK_ALLOCATED(p, "ProcTrack p", );
op = p->privatedata;
- lrmd_debug(LOG_DEBUG, "on_ra_proc_finished: accessing the op whose "
+ lrmd_debug2(LOG_DEBUG, "on_ra_proc_finished: accessing the op whose "
"address is %p", op);
CHECK_ALLOCATED(op, "op", );
if (op->exec_pid == 0) {
@@ -3292,6 +3296,8 @@
lrmd_rsc_t* rsc = NULL;
lrmd_op_t* op = (lrmd_op_t *)user_data;
+ lrmd_debug2(LOG_DEBUG, "%s begin.", __FUNCTION__);
+
*data = NULL;
gstr_tmp = g_string_new("");
@@ -3338,6 +3344,8 @@
*data = gstr_tmp->str;
g_string_free(gstr_tmp, FALSE);
}
+
+ lrmd_debug2(LOG_DEBUG, "%s end.", __FUNCTION__);
return rc;
}
@@ -3435,6 +3443,9 @@
}
/*
* $Log: lrmd.c,v $
+ * Revision 1.188 2005/11/24 10:27:01 sunjd
+ * add a log output function for level2 debug
+ *
* Revision 1.187 2005/11/17 10:32:56 sunjd
* Polish the log message to be more detailed
*
------------------------------
Message: 2
Date: Thu, 24 Nov 2005 07:05:12 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by davidlee from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : davidlee
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/clplumbing
Modified Files:
setproctitle.c
Log Message:
'PF_ARGV_TYPE == PF_ARGV_NONE' should have minimal footprint.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/setproctitle.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- setproctitle.c 20 Apr 2005 23:42:17 -0000 1.1
+++ setproctitle.c 24 Nov 2005 14:05:11 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Id: setproctitle.c,v 1.1 2005/04/20 23:42:17 gshi Exp $ */
+/* $Id: setproctitle.c,v 1.2 2005/11/24 14:05:11 davidlee Exp $ */
/*
* setproctitle.c
*
@@ -75,8 +75,11 @@
#include <clplumbing/setproctitle.h>
+#if PF_ARGV_TYPE != PF_ARGV_NONE
static char **Argv = NULL;
static char *LastArgv = NULL;
+#endif /* PF_ARGV_TYPE != PF_ARGV_NONE */
+
extern char **environ;
#ifdef HAVE___PROGNAME
@@ -87,6 +90,9 @@
int
init_set_proc_title(int argc, char *argv[], char *envp[])
{
+#if PF_ARGV_TYPE == PF_ARGV_NONE
+ return 0;
+#else
int i;
int envpsize;
char **p;
@@ -148,10 +154,12 @@
}
ha_free(environ);
return -1;
+#endif /* PF_ARGV_TYPE == PF_ARGV_NONE */
}
void set_proc_title(const char *fmt,...)
{
+#if PF_ARGV_TYPE != PF_ARGV_NONE
va_list msg;
static char statbuf[BUFSIZ];
@@ -224,4 +232,6 @@
#endif /* PF_ARGV_PSSTRINGS */
#endif /* HAVE_SETPROCTITLE */
+
+#endif /* PF_ARGV_TYPE != PF_ARGV_NONE */
}
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 24, Issue 66
********************************************