Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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: heartbeat by davidlee from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: resources by davidlee from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: include by alan from 
      (linux-ha-cvs@lists.linux-ha.org)
   4. Linux-HA CVS: lib by alan from  (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Wed, 16 Aug 2006 05:09:39 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by davidlee from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : davidlee
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat


Modified Files:
        shellfuncs.in 


Log Message:
Clearer implementation of 'ha_clustermsg()'.  Matt also indicates that this 
seems to act as bugfix on FreeBSD.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/shellfuncs.in,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- shellfuncs.in       8 Aug 2006 17:00:59 -0000       1.25
+++ shellfuncs.in       16 Aug 2006 11:09:39 -0000      1.26
@@ -136,12 +136,14 @@
        fi
 }
 
+# copy stdin (text) to FIFO, with surrounding ">>>" and "<<<" marker lines.
+# no args.; no result
+# Notes:
+#      o Using "cat -" rather than "cat" simply for clarity.
+#      o The trailing "| cat -" tries to hold things together as a single
+#        write (which is probably preferable behaviour in this context).
 ha_clustermsg() {
-       cat $* <<-!MSG >> $HA_FIFO
->>>
-`cat`
-<<<
-!MSG
+       (echo ">>>"; cat -; echo "<<<") | cat - >> $HA_FIFO
 }
 
 ha_parameter() {




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

Message: 2
Date: Wed, 16 Aug 2006 05:40:50 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by davidlee from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : davidlee
Host    : 
Project : linux-ha
Module  : resources

Dir     : linux-ha/resources/OCF


Modified Files:
        IPaddr.in 


Log Message:
Restore part of 1.46 accidentally lost at 1.49
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/IPaddr.in,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- IPaddr.in   14 Aug 2006 16:32:53 -0000      1.50
+++ IPaddr.in   16 Aug 2006 11:40:50 -0000      1.51
@@ -495,10 +495,11 @@
          CMD="$IFCONFIG $iface $ipaddr netmask $netmask broadcast $broadcast";;
   esac
 
-  $CMD
+  # Use "eval $CMD" (not "$CMD"): it might be a chain of two or more commands.
+  eval $CMD
   rc=$?
   if [ $rc != 0 ]; then
-      echo "ERROR: $CMD failed (rc=$rc)"
+      echo "ERROR: eval $CMD failed (rc=$rc)"
   fi
 
   return $rc




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

Message: 3
Date: Wed, 16 Aug 2006 08:37:08 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: include by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : include

Dir     : linux-ha/include/clplumbing


Modified Files:
        longclock.h 


Log Message:
Bugzilla 1407: Heartbeat fails every 497 days on 32-bit Linux

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/clplumbing/longclock.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- longclock.h 22 Jun 2005 14:01:34 -0000      1.9
+++ longclock.h 16 Aug 2006 14:37:07 -0000      1.10
@@ -1,4 +1,4 @@
-/* $Id: longclock.h,v 1.9 2005/06/22 14:01:34 davidlee Exp $ */
+/* $Id: longclock.h,v 1.10 2006/08/16 14:37:07 alan Exp $ */
 /*
  * Longclock operations
  *
@@ -39,6 +39,10 @@
  *
  *     The functions provided here are:
  *
+ *     unsigned long   cl_times(void);
+ *                     A rational wrapper for the times(2) call
+ *                     for those cases where only the return value
+ *                     is wanted.
  *     longclock_t     time_longclock(void);
  *                     Returns current time as a longclock_t.
  *
@@ -77,6 +81,7 @@
  *
  *     extern const longclock_t        zero_longclock;
  */
+extern unsigned long cl_times(void);
 
 #ifdef CLOCK_T_IS_LONG_ENOUGH
 #      ifndef  HAVE_LONGCLOCK_ARITHMETIC




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

Message: 4
Date: Wed, 16 Aug 2006 08:37:08 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/stonith


Modified Files:
        expect.c 


Log Message:
Bugzilla 1407: Heartbeat fails every 497 days on 32-bit Linux

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/stonith/expect.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- expect.c    11 May 2005 11:49:20 -0000      1.21
+++ expect.c    16 Aug 2006 14:37:08 -0000      1.22
@@ -1,4 +1,4 @@
-/* $Id: expect.c,v 1.21 2005/05/11 11:49:20 andrew Exp $ */
+/* $Id: expect.c,v 1.22 2006/08/16 14:37:08 alan Exp $ */
 /*
  * Simple expect module for the STONITH library
  *
@@ -44,6 +44,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <stonith/st_ttylock.h>
+#include <clplumbing/longclock.h>
 #define ENABLE_PIL_DEFS_PRIVATE
 #include <pils/plugin.h>
 
@@ -65,6 +66,32 @@
 #define STRDUP         StonithPIsys->imports->mstrdup
 #define FREE(p)               {StonithPIsys->imports->mfree(p); (p) = NULL;}
 
+#ifdef TIMES_ALLOWS_NULL_PARAM
+#      define  TIMES_PARAM     NULL
+#else
+       static struct tms       dummy_longclock_tms_struct;
+#      define  TIMES_PARAM     &dummy_longclock_tms_struct
+#endif
+
+static unsigned long
+our_times(void)        /* Make times(2) behave rationally on Linux */
+{
+       int             save_errno;
+       clock_t ret;
+
+       /*
+        * This code copied from clplumbing/longclock.c to avoid
+        * making STONITH depend on clplumbing.  See it for an explanation
+        */
+       errno   = 0;
+       ret     = times(TIMES_PARAM);
+
+       if (errno != 0) {
+               ret = (clock_t) (-errno);
+       }
+       errno = save_errno;
+       return (unsigned long)ret;
+}
 /*
  *     Look for ('expect') any of a series of tokens in the input
  *     Return the token type for the given token or -1 on error.
@@ -74,11 +101,6 @@
 ExpectToken(int        fd, struct Etoken * toklist, int to_secs, char * savebuf
 ,      int maxline, int Debug)
 {
-       /*
-        * We use unsigned long instead of clock_t here because it's signed,
-        * but the return value from times() is basically unsigned...
-        * This is broken, but according to POSIX ;-)
-        */
        unsigned long   starttime;
        unsigned long   endtime;
        int             wraparound=0;
@@ -94,7 +116,7 @@
 
        /* Figure out when to give up.  Handle lbolt wraparound */
 
-       starttime = times(NULL);
+       starttime = our_times();
        ticks = (to_secs*hz);
        endtime = starttime + ticks;
 
@@ -111,7 +133,7 @@
        }
 
 
-       while (now = times(NULL),
+       while (now = our_times(),
                (wraparound && (now > starttime || now <= endtime))
                ||      (!wraparound && now <= endtime)) {
 




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

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 33, Issue 71
********************************************

Reply via email to