rpms/cpqarrayd/devel cpqarrayd-2.3.no_ida.patch, 1.1, 1.2 cpqarrayd.spec, 1.1, 1.2

David Juran (djuran) fedora-extras-commits at redhat.com
Fri Jul 18 10:17:23 UTC 2008


Author: djuran

Update of /cvs/pkgs/rpms/cpqarrayd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29145

Modified Files:
	cpqarrayd-2.3.no_ida.patch cpqarrayd.spec 
Log Message:
Cleanup no-ida patch


cpqarrayd-2.3.no_ida.patch:

Index: cpqarrayd-2.3.no_ida.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cpqarrayd/devel/cpqarrayd-2.3.no_ida.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cpqarrayd-2.3.no_ida.patch	18 Jul 2008 08:21:21 -0000	1.1
+++ cpqarrayd-2.3.no_ida.patch	18 Jul 2008 10:16:37 -0000	1.2
@@ -1,6 +1,113 @@
-diff -up cpqarrayd-2.3/configure.ac.orig cpqarrayd-2.3/configure.ac
---- cpqarrayd-2.3/configure.ac.orig	2008-07-09 15:00:42.000000000 +0300
-+++ cpqarrayd-2.3/configure.ac	2008-07-09 15:02:58.000000000 +0300
+diff -up cpqarrayd-2.3/status.c.no_ida cpqarrayd-2.3/status.c
+--- cpqarrayd-2.3/status.c.no_ida	2007-12-03 19:06:22.000000000 +0200
++++ cpqarrayd-2.3/status.c	2008-07-18 11:43:59.000000000 +0300
+@@ -33,9 +33,13 @@
+ #endif
+ 
+ #include <sys/ioctl.h>
++
++#ifdef HAVE_IDA
+ #include <ida_ioctl.h>
+ #include <ida_cmd.h>
+ #include <cpqarray.h>
++#endif
++
+ #include <syslog.h>
+ 
+ #include "cpqarrayd.h"
+@@ -45,7 +49,8 @@
+ #include "cciss_structs.h"
+ #include "cciss_functions.h"
+ 
+-int status_check (struct opts opts) 
++#ifdef HAVE_IDA
++int status_check (struct opts opts)
+ {
+   
+   int devicefd;
+@@ -183,6 +188,7 @@ int status_check (struct opts opts) 
+   return 1;
+  
+ }
++#endif
+ 
+ int cciss_status_check (struct opts opts) 
+ {
+@@ -190,7 +196,6 @@ int cciss_status_check (struct opts opts
+   int devicefd;
+   int ctrl_cntr, result;
+   int logd_cntr;
+-  ida_ioctl_t io, io2;
+   int status, nr_blks, blks_tr, trap_stat;
+   float pvalue;
+   char statusmsg[1024];
+diff -up cpqarrayd-2.3/discover.c.no_ida cpqarrayd-2.3/discover.c
+--- cpqarrayd-2.3/discover.c.no_ida	2007-12-03 19:06:22.000000000 +0200
++++ cpqarrayd-2.3/discover.c	2008-07-18 11:49:23.000000000 +0300
+@@ -33,12 +33,14 @@
+   #include <linux/compiler.h>
+ #endif
+ 
++#ifdef WITH_IDA
+ #if defined(__linux__)
+   #include <ida_ioctl.h>
+   #include <ida_ioctl.h>
+   #include <ida_cmd.h>
+   #include <cpqarray.h>
+ #endif
++#endif
+ 
+ #if defined(__freebsd__)
+   #include <idavar.h>
+@@ -52,8 +54,12 @@
+ 
+ 
+ int discover_controllers (struct opts);
++
++#ifdef WITH_IDA
+ int interrogate_controller (struct opts, const char *);
+ int interrogate_logical(struct opts, int, int);
++#endif
++
+ void boardid2str (unsigned long , char *);
+ 
+ /* Added devfs devices 
+@@ -84,6 +90,7 @@ discover_controllers (struct opts opts)
+   int cntr;
+   int foundone = 0;
+ 
++#ifdef WITH_IDA
+   for (cntr = 0; cntr < 8; cntr++)
+     {
+       /* does this device exist ? */
+@@ -104,6 +111,8 @@ discover_controllers (struct opts opts)
+ 	  perror ("DEBUG: reason");
+ 	}
+     }
++#endif
++
+   for (cntr = 0; cntr < 16; cntr++)
+     {
+       /* does this device exist ? */
+@@ -127,6 +136,7 @@ discover_controllers (struct opts opts)
+    return foundone;
+ }
+ 
++#ifdef WITH_IDA
+ int
+ interrogate_controller (struct opts opts, const char *devicefile)
+ {
+@@ -227,6 +237,7 @@ interrogate_logical (struct opts opts, i
+ 
+   return 1;
+ }
++#endif
+ 
+ void
+ boardid2str (unsigned long board_id, char *name)
+diff -up cpqarrayd-2.3/configure.ac.no_ida cpqarrayd-2.3/configure.ac
+--- cpqarrayd-2.3/configure.ac.no_ida	2005-12-16 13:17:44.000000000 +0200
++++ cpqarrayd-2.3/configure.ac	2008-07-18 11:41:27.000000000 +0300
 @@ -16,35 +16,35 @@ AC_PROG_MAKE_SET
  AC_HEADER_STDC
  AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h unistd.h])
@@ -62,581 +169,28 @@
  
  dnl Check for CCISS header file
  AC_CHECK_HEADERS(linux/cciss_ioctl.h,,
-diff -up cpqarrayd-2.3/cpqarrayd.c.orig cpqarrayd-2.3/cpqarrayd.c
---- cpqarrayd-2.3/cpqarrayd.c.orig	2008-07-09 15:03:52.000000000 +0300
-+++ cpqarrayd-2.3/cpqarrayd.c	2008-07-09 15:22:19.000000000 +0300
-@@ -35,9 +35,9 @@
+--- cpqarrayd-2.3/cpqarrayd.c.no_ida	2007-12-03 19:06:22.000000000 +0200
++++ cpqarrayd-2.3/cpqarrayd.c	2008-07-18 13:02:17.000000000 +0300
+@@ -35,9 +35,11 @@
    #include <linux/compiler.h>
  #endif
  
--#if defined(__linux__)
--  #include <ida_ioctl.h>
--#endif
-+/* #if defined(__linux__) */
-+/*   #include <ida_ioctl.h> */
-+/* #endif */
++#ifdef WITH_IDA
+ #if defined(__linux__)
+   #include <ida_ioctl.h>
+ #endif
++#endif
  
  #if defined(__freebsd__)
    #include <idavar.h>
-@@ -249,7 +249,7 @@ int main(int argc, char *argv[]) 
+@@ -249,7 +251,10 @@
    syslog(LOG_INFO, "Logging Enabled...");
    
    while (keeprunning) {
--    status_check(opts);
-+/*     status_check(opts); */
++
++#ifdef WITH_IDA
+     status_check(opts);
++#endif
      cciss_status_check(opts);
      if (keeprunning) { sleep(30); }
    }
-diff -up cpqarrayd-2.3/discover.c.orig cpqarrayd-2.3/discover.c
---- cpqarrayd-2.3/discover.c.orig	2008-07-09 15:05:25.000000000 +0300
-+++ cpqarrayd-2.3/discover.c	2008-07-09 15:12:43.000000000 +0300
-@@ -33,12 +33,12 @@
-   #include <linux/compiler.h>
- #endif
- 
--#if defined(__linux__)
--  #include <ida_ioctl.h>
--  #include <ida_ioctl.h>
--  #include <ida_cmd.h>
--  #include <cpqarray.h>
--#endif
-+/* #if defined(__linux__) */
-+/*   #include <ida_ioctl.h> */
-+/*   #include <ida_ioctl.h> */
-+/*   #include <ida_cmd.h> */
-+/*   #include <cpqarray.h> */
-+/* #endif */
- 
- #if defined(__freebsd__)
-   #include <idavar.h>
-@@ -52,8 +52,8 @@
- 
- 
- int discover_controllers (struct opts);
--int interrogate_controller (struct opts, const char *);
--int interrogate_logical(struct opts, int, int);
-+/* int interrogate_controller (struct opts, const char *); */
-+/* int interrogate_logical(struct opts, int, int); */
- void boardid2str (unsigned long , char *);
- 
- /* Added devfs devices 
-@@ -84,26 +84,26 @@ discover_controllers (struct opts opts)
-   int cntr;
-   int foundone = 0;
- 
--  for (cntr = 0; cntr < 8; cntr++)
--    {
--      /* does this device exist ? */
--      if ((access (controllers[cntr], R_OK | F_OK)) == 0)
--	{
--	  /* it does :) */
--	  if (interrogate_controller (opts, controllers[cntr]))
--	    {
--	      foundone = 1;
--	      if (opts.debug) 
--		fprintf (stderr, "DEBUG: %s is a existing controller\n",
--			 controllers[cntr]);
--	    }
--	}
--      else if (opts.debug)
--	{
--	  fprintf (stderr, "DEBUG: Device %s could not be opened\n", controllers[cntr]);
--	  perror ("DEBUG: reason");
--	}
--    }
-+/*   for (cntr = 0; cntr < 8; cntr++) */
-+/*     { */
-+/*       /\* does this device exist ? *\/ */
-+/*       if ((access (controllers[cntr], R_OK | F_OK)) == 0) */
-+/* 	{ */
-+/* 	  /\* it does :) *\/ */
-+/* 	  if (interrogate_controller (opts, controllers[cntr])) */
-+/* 	    { */
-+/* 	      foundone = 1; */
-+/* 	      if (opts.debug)  */
-+/* 		fprintf (stderr, "DEBUG: %s is a existing controller\n", */
-+/* 			 controllers[cntr]); */
-+/* 	    } */
-+/* 	} */
-+/*       else if (opts.debug) */
-+/* 	{ */
-+/* 	  fprintf (stderr, "DEBUG: Device %s could not be opened\n", controllers[cntr]); */
-+/* 	  perror ("DEBUG: reason"); */
-+/* 	} */
-+/*     } */
-   for (cntr = 0; cntr < 16; cntr++)
-     {
-       /* does this device exist ? */
-@@ -127,106 +127,106 @@ discover_controllers (struct opts opts)
-    return foundone;
- }
- 
--int
--interrogate_controller (struct opts opts, const char *devicefile)
--{
--  int devicefd;
--  ida_ioctl_t io;
--  char buffer[30];
--  int foundone = 0;
--  int cntr;
-+/* int */
-+/* interrogate_controller (struct opts opts, const char *devicefile) */
-+/* { */
-+/*   int devicefd; */
-+/*   ida_ioctl_t io; */
-+/*   char buffer[30]; */
-+/*   int foundone = 0; */
-+/*   int cntr; */
-  
- 
--  devicefd = open (devicefile, O_RDONLY);
--  /* no checks, did that before */
-+/*   devicefd = open (devicefile, O_RDONLY); */
-+/*   /\* no checks, did that before *\/ */
- 
--  /* clear io */
--  memset (&io, 0, sizeof (io));
-+/*   /\* clear io *\/ */
-+/*   memset (&io, 0, sizeof (io)); */
- 
--  io.cmd = ID_CTLR;
-+/*   io.cmd = ID_CTLR; */
- 
--  if (ioctl (devicefd, IDAPASSTHRU, &io) < 0)
--    {
--      if (opts.debug) perror ("DEBUG: ioctl");
--      return 0;
--    }
-+/*   if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) */
-+/*     { */
-+/*       if (opts.debug) perror ("DEBUG: ioctl"); */
-+/*       return 0; */
-+/*     } */
- 
--  boardid2str (io.c.id_ctlr.board_id, buffer);
-+/*   boardid2str (io.c.id_ctlr.board_id, buffer); */
- 
--  ctrls_found[ctrls_found_num].ctrl_devicename = (char *)malloc(strlen(buffer)+1);
--  strncpy (ctrls_found[ctrls_found_num].ctrl_devicename, 
--	   buffer, strlen(buffer)+1);
-+/*   ctrls_found[ctrls_found_num].ctrl_devicename = (char *)malloc(strlen(buffer)+1); */
-+/*   strncpy (ctrls_found[ctrls_found_num].ctrl_devicename,  */
-+/* 	   buffer, strlen(buffer)+1); */
- 
--  ctrls_found[ctrls_found_num].ctrl_type = CTRLTYPE_IDA;
-+/*   ctrls_found[ctrls_found_num].ctrl_type = CTRLTYPE_IDA; */
- 
--  ctrls_found[ctrls_found_num].num_logd_found = 0;
-+/*   ctrls_found[ctrls_found_num].num_logd_found = 0; */
- 
--  for (cntr = 0; cntr < io.c.id_ctlr.nr_drvs; cntr++)
--    {
--      if (interrogate_logical (opts, devicefd, cntr))
--	{
--	  foundone = 1;
--	}
--    }
-+/*   for (cntr = 0; cntr < io.c.id_ctlr.nr_drvs; cntr++) */
-+/*     { */
-+/*       if (interrogate_logical (opts, devicefd, cntr)) */
-+/* 	{ */
-+/* 	  foundone = 1; */
-+/* 	} */
-+/*     } */
- 
--  if (opts.verbose) printf("  Found a %s (%d Logical drives)\n", buffer,
--			   ctrls_found[ctrls_found_num].num_logd_found);
-+/*   if (opts.verbose) printf("  Found a %s (%d Logical drives)\n", buffer, */
-+/* 			   ctrls_found[ctrls_found_num].num_logd_found); */
- 
--  ctrls_found[ctrls_found_num].devicefile = (char *)malloc(strlen(devicefile)+1);
--  strcpy(ctrls_found[ctrls_found_num].devicefile, devicefile);
-+/*   ctrls_found[ctrls_found_num].devicefile = (char *)malloc(strlen(devicefile)+1); */
-+/*   strcpy(ctrls_found[ctrls_found_num].devicefile, devicefile); */
- 
--  close (devicefd);
-+/*   close (devicefd); */
- 
--  ctrls_found_num++;
-+/*   ctrls_found_num++; */
- 
--  return 1;
--}
-+/*   return 1; */
-+/* } */
- 
--int
--interrogate_logical (struct opts opts, int devicefd, int unit_nr)
--{
--  ida_ioctl_t io;
--  ida_ioctl_t io2;
--  int nr_blks, blks_tr;
-+/* int */
-+/* interrogate_logical (struct opts opts, int devicefd, int unit_nr) */
-+/* { */
-+/*   ida_ioctl_t io; */
-+/*   ida_ioctl_t io2; */
-+/*   int nr_blks, blks_tr; */
- 
--  if (opts.debug) printf ("DEBUG: interrogating unit %d\n", unit_nr);
-+/*   if (opts.debug) printf ("DEBUG: interrogating unit %d\n", unit_nr); */
- 
--  memset (&io, 0, sizeof (io));
-+/*   memset (&io, 0, sizeof (io)); */
- 
--  io.cmd = ID_LOG_DRV;
--  io.unit = unit_nr | UNITVALID;
-+/*   io.cmd = ID_LOG_DRV; */
-+/*   io.unit = unit_nr | UNITVALID; */
- 
--  if (ioctl (devicefd, IDAPASSTHRU, &io) < 0)
--    {
--      perror ("FATAL: ID_LOG_DRV ioctl");
--      return 0;
--    }
-+/*   if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) */
-+/*     { */
-+/*       perror ("FATAL: ID_LOG_DRV ioctl"); */
-+/*       return 0; */
-+/*     } */
- 
--  memset (&io2, 0, sizeof (io2));
-+/*   memset (&io2, 0, sizeof (io2)); */
- 
--  io2.cmd = SENSE_LOG_DRV_STAT;
--  io2.unit = unit_nr | UNITVALID;
-+/*   io2.cmd = SENSE_LOG_DRV_STAT; */
-+/*   io2.unit = unit_nr | UNITVALID; */
- 
--  if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0)
--    {
--      perror ("FATAL: SENSE_LOG_DRV_STAT ioctl");
--      return 0;
--    }
-+/*   if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0) */
-+/*     { */
-+/*       perror ("FATAL: SENSE_LOG_DRV_STAT ioctl"); */
-+/*       return 0; */
-+/*     } */
-   
--  ctrls_found[ctrls_found_num].num_logd_found++;
--  /*  ctrls_found[ctrls_found_num].log_disk[unit_nr].status =
--   * io2.c.sense_log_drv_stat.status;
--
--   * nr_blks = io2.c.id_log_drv.nr_blks;
--   * blks_tr = io.c.sense_log_drv_stat.blks_to_recover;
--   * ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue =
--   *  ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100;
--   */
--  ctrls_found[ctrls_found_num].log_disk[unit_nr].status = 0;
--  ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue = 0;
-+/*   ctrls_found[ctrls_found_num].num_logd_found++; */
-+/*   /\*  ctrls_found[ctrls_found_num].log_disk[unit_nr].status = */
-+/*    * io2.c.sense_log_drv_stat.status; */
-+
-+/*    * nr_blks = io2.c.id_log_drv.nr_blks; */
-+/*    * blks_tr = io.c.sense_log_drv_stat.blks_to_recover; */
-+/*    * ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue = */
-+/*    *  ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100; */
-+/*    *\/ */
-+/*   ctrls_found[ctrls_found_num].log_disk[unit_nr].status = 0; */
-+/*   ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue = 0; */
- 
--  return 1;
--}
-+/*   return 1; */
-+/* } */
- 
- void
- boardid2str (unsigned long board_id, char *name)
-diff -up cpqarrayd-2.3/status.c.orig cpqarrayd-2.3/status.c
---- cpqarrayd-2.3/status.c.orig	2008-07-09 15:16:05.000000000 +0300
-+++ cpqarrayd-2.3/status.c	2008-07-09 15:20:51.000000000 +0300
-@@ -33,9 +33,9 @@
- #endif
- 
- #include <sys/ioctl.h>
--#include <ida_ioctl.h>
--#include <ida_cmd.h>
--#include <cpqarray.h>
-+/* #include <ida_ioctl.h> */
-+/* #include <ida_cmd.h> */
-+/* #include <cpqarray.h> */
- #include <syslog.h>
- 
- #include "cpqarrayd.h"
-@@ -45,144 +45,144 @@
- #include "cciss_structs.h"
- #include "cciss_functions.h"
- 
--int status_check (struct opts opts) 
--{
-+/* int status_check (struct opts opts)  */
-+/* { */
-   
--  int devicefd;
--  int ctrl_cntr;
--  int logd_cntr;
--  ida_ioctl_t io, io2;
--  int status, nr_blks, blks_tr, trap_stat;
--  float pvalue;
--  char statusmsg[1024];
--  int counter;
-+/*   int devicefd; */
-+/*   int ctrl_cntr; */
-+/*   int logd_cntr; */
-+/*   ida_ioctl_t io, io2; */
-+/*   int status, nr_blks, blks_tr, trap_stat; */
-+/*   float pvalue; */
-+/*   char statusmsg[1024]; */
-+/*   int counter; */
-   
-     
--  for ( ctrl_cntr=0;
--        ctrl_cntr <  ctrls_found_num;
--        ctrl_cntr++) {
--    if (ctrls_found[ctrl_cntr].ctrl_type != CTRLTYPE_IDA) {
--      break;
--    }
-+/*   for ( ctrl_cntr=0; */
-+/*         ctrl_cntr <  ctrls_found_num; */
-+/*         ctrl_cntr++) { */
-+/*     if (ctrls_found[ctrl_cntr].ctrl_type != CTRLTYPE_IDA) { */
-+/*       break; */
-+/*     } */
- 
--    devicefd = open (ctrls_found[ctrl_cntr].devicefile, O_RDONLY);
-+/*     devicefd = open (ctrls_found[ctrl_cntr].devicefile, O_RDONLY); */
-     
--    for ( logd_cntr=0;
--          logd_cntr < ctrls_found[ctrl_cntr].num_logd_found;
--          logd_cntr++) {
-+/*     for ( logd_cntr=0; */
-+/*           logd_cntr < ctrls_found[ctrl_cntr].num_logd_found; */
-+/*           logd_cntr++) { */
-       
--        memset (&io, 0, sizeof (io));
-+/*         memset (&io, 0, sizeof (io)); */
- 
--        io.cmd = SENSE_LOG_DRV_STAT;
--        io.unit = logd_cntr  | UNITVALID;
-+/*         io.cmd = SENSE_LOG_DRV_STAT; */
-+/*         io.unit = logd_cntr  | UNITVALID; */
-         
--        if (ioctl (devicefd, IDAPASSTHRU, &io) < 0)
--          {
--            perror ("SENSE_LOG_DRV_STAT ioctl");
--            return 0;
--          }
-+/*         if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) */
-+/*           { */
-+/*             perror ("SENSE_LOG_DRV_STAT ioctl"); */
-+/*             return 0; */
-+/*           } */
- 
--        status=io.c.sense_log_drv_stat.status;
-+/*         status=io.c.sense_log_drv_stat.status; */
-         
--        if ((status == 3) || (status == 5) || (status == 7)) {
--          /* is a progress indicator required?
--           */
--          memset (&io2, 0, sizeof (io));
-+/*         if ((status == 3) || (status == 5) || (status == 7)) { */
-+/*           /\* is a progress indicator required? */
-+/*            *\/ */
-+/*           memset (&io2, 0, sizeof (io)); */
-           
--          io2.cmd = ID_LOG_DRV;
--          io2.unit = logd_cntr  | UNITVALID;
-+/*           io2.cmd = ID_LOG_DRV; */
-+/*           io2.unit = logd_cntr  | UNITVALID; */
-           
--          if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0)
--            {
--              perror ("ID_LOG_DRV ioctl");
--              /* return 0;   no return this isn't fatal for now */
--            }
--          else 
--            {
--              nr_blks = io2.c.id_log_drv.nr_blks;
--              blks_tr = io.c.sense_log_drv_stat.blks_to_recover;
-+/*           if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0) */
-+/*             { */
-+/*               perror ("ID_LOG_DRV ioctl"); */
-+/*               /\* return 0;   no return this isn't fatal for now *\/ */
-+/*             } */
-+/*           else  */
-+/*             { */
-+/*               nr_blks = io2.c.id_log_drv.nr_blks; */
-+/*               blks_tr = io.c.sense_log_drv_stat.blks_to_recover; */
-                   
--              pvalue = ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100;
-+/*               pvalue = ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100; */
- 
--            }
--        }
--        else {
--          pvalue = 0.0;
--        }
--
--        if (opts.debug) {
--	  fprintf(stdout, "DEBUG: Status of controller %d unit %d is %d\n", 
--		  ctrl_cntr, logd_cntr, status);
--          fprintf(stdout, "DEBUG: ");
--	  fprintf(stdout, statusstr[status], 
--		  ctrl_cntr, logd_cntr, pvalue);
--	  fprintf(stdout, "\n");
--	}
-+/*             } */
-+/*         } */
-+/*         else { */
-+/*           pvalue = 0.0; */
-+/*         } */
-+
-+/*         if (opts.debug) { */
-+/* 	  fprintf(stdout, "DEBUG: Status of controller %d unit %d is %d\n",  */
-+/* 		  ctrl_cntr, logd_cntr, status); */
-+/*           fprintf(stdout, "DEBUG: "); */
-+/* 	  fprintf(stdout, statusstr[status],  */
-+/* 		  ctrl_cntr, logd_cntr, pvalue); */
-+/* 	  fprintf(stdout, "\n"); */
-+/* 	} */
- 	
--	if (status != ctrls_found[ctrl_cntr].log_disk[logd_cntr].status) {
--	  /* status changed, time to send a trap */
--	  syslog(LOG_WARNING, "/dev/c%dd%d: Status change.", ctrl_cntr, 
--		 logd_cntr);
--	  syslog(LOG_WARNING, statusstr[status], ctrl_cntr, logd_cntr,
--		 pvalue);
--	  if (opts.debug) {
--	    printf ("DEBUG: status changed from %d to %d, pvalue = %f\n",
--		    ctrls_found[ctrl_cntr].log_disk[logd_cntr].status, status,
--		    pvalue);
--	  }
--	  sprintf(statusmsg, statusstr[status], ctrl_cntr, logd_cntr, pvalue);
--	  if (opts.debug) {
--	      printf("DEBUG: sending traps.\n");
--	  }
--	  /* Send a trap, syslog if send_trap returns !0. */
--	  if (trap_stat = sendtrap(opts, "beheer", status, statusmsg)) {
--	    syslog(LOG_WARNING, 
--		   "problem sending snmp trap (sendtrap() returned %d)\n",
--		   trap_stat);
--	    if (opts.debug) {
--	      printf("DEBUG: Problem sending snmp trap",
--		     "(sendtrap() returned %d)\n", 
--		     trap_stat);
--	    }
--	  }
--	}
--	else if ((status == 5) && 
--		 ((pvalue - ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue)
--		  >= 25.0 )) {
--	  /* pvalue changed by more than 25%, time to send a trap */
--	  syslog(LOG_WARNING, "/dev/c%dd%d: Percentile value change.", 
--		 ctrl_cntr, logd_cntr);
--	  syslog(LOG_WARNING, statusstr[status], ctrl_cntr, logd_cntr,
--		 pvalue);
--	  if (opts.debug) {
--	    printf ("DEBUG: pvalue changed from %f to %f\n",
--		    ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue,
--		    pvalue);
--	  }
--	  sprintf(statusmsg, statusstr[status], ctrl_cntr, logd_cntr, pvalue);
--	  if (opts.debug) {
--	      printf("DEBUG: sending traps.\n");
--	  }
--	  if (trap_stat = sendtrap(opts, "beheer", status, statusmsg)) {
--	    syslog(LOG_WARNING,
--		   "problem sending snmp trap (sendtrap() returned %d)\n",
--		   trap_stat);
--	    if (opts.debug) {
--	      printf("DEBUG: Problem sending snmp trap ",
--		     "(sendtrap() returned %d)\n",
--		     trap_stat);
--	    }
--	  }
--	  ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue = pvalue;
--	}
--	ctrls_found[ctrl_cntr].log_disk[logd_cntr].status = status;
--    }
--    close (devicefd);
--  }
-+/* 	if (status != ctrls_found[ctrl_cntr].log_disk[logd_cntr].status) { */
-+/* 	  /\* status changed, time to send a trap *\/ */
-+/* 	  syslog(LOG_WARNING, "/dev/c%dd%d: Status change.", ctrl_cntr,  */
-+/* 		 logd_cntr); */
-+/* 	  syslog(LOG_WARNING, statusstr[status], ctrl_cntr, logd_cntr, */
-+/* 		 pvalue); */
-+/* 	  if (opts.debug) { */
-+/* 	    printf ("DEBUG: status changed from %d to %d, pvalue = %f\n", */
-+/* 		    ctrls_found[ctrl_cntr].log_disk[logd_cntr].status, status, */
-+/* 		    pvalue); */
-+/* 	  } */
-+/* 	  sprintf(statusmsg, statusstr[status], ctrl_cntr, logd_cntr, pvalue); */
-+/* 	  if (opts.debug) { */
-+/* 	      printf("DEBUG: sending traps.\n"); */
-+/* 	  } */
-+/* 	  /\* Send a trap, syslog if send_trap returns !0. *\/ */
-+/* 	  if (trap_stat = sendtrap(opts, "beheer", status, statusmsg)) { */
-+/* 	    syslog(LOG_WARNING,  */
-+/* 		   "problem sending snmp trap (sendtrap() returned %d)\n", */
-+/* 		   trap_stat); */
-+/* 	    if (opts.debug) { */
-+/* 	      printf("DEBUG: Problem sending snmp trap", */
-+/* 		     "(sendtrap() returned %d)\n",  */
-+/* 		     trap_stat); */
-+/* 	    } */
-+/* 	  } */
-+/* 	} */
-+/* 	else if ((status == 5) &&  */
-+/* 		 ((pvalue - ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue) */
-+/* 		  >= 25.0 )) { */
-+/* 	  /\* pvalue changed by more than 25%, time to send a trap *\/ */
-+/* 	  syslog(LOG_WARNING, "/dev/c%dd%d: Percentile value change.",  */
-+/* 		 ctrl_cntr, logd_cntr); */
-+/* 	  syslog(LOG_WARNING, statusstr[status], ctrl_cntr, logd_cntr, */
-+/* 		 pvalue); */
-+/* 	  if (opts.debug) { */
-+/* 	    printf ("DEBUG: pvalue changed from %f to %f\n", */
-+/* 		    ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue, */
-+/* 		    pvalue); */
-+/* 	  } */
-+/* 	  sprintf(statusmsg, statusstr[status], ctrl_cntr, logd_cntr, pvalue); */
-+/* 	  if (opts.debug) { */
-+/* 	      printf("DEBUG: sending traps.\n"); */
-+/* 	  } */
-+/* 	  if (trap_stat = sendtrap(opts, "beheer", status, statusmsg)) { */
-+/* 	    syslog(LOG_WARNING, */
-+/* 		   "problem sending snmp trap (sendtrap() returned %d)\n", */
-+/* 		   trap_stat); */
-+/* 	    if (opts.debug) { */
-+/* 	      printf("DEBUG: Problem sending snmp trap ", */
-+/* 		     "(sendtrap() returned %d)\n", */
-+/* 		     trap_stat); */
-+/* 	    } */
-+/* 	  } */
-+/* 	  ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue = pvalue; */
-+/* 	} */
-+/* 	ctrls_found[ctrl_cntr].log_disk[logd_cntr].status = status; */
-+/*     } */
-+/*     close (devicefd); */
-+/*   } */
- 
--  return 1;
-+/*   return 1; */
-  
--}
-+/* } */
- 
- int cciss_status_check (struct opts opts) 
- {
-@@ -190,7 +190,7 @@ int cciss_status_check (struct opts opts
-   int devicefd;
-   int ctrl_cntr, result;
-   int logd_cntr;
--  ida_ioctl_t io, io2;
-+/*   ida_ioctl_t io, io2; */
-   int status, nr_blks, blks_tr, trap_stat;
-   float pvalue;
-   char statusmsg[1024];


Index: cpqarrayd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cpqarrayd/devel/cpqarrayd.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cpqarrayd.spec	18 Jul 2008 08:21:21 -0000	1.1
+++ cpqarrayd.spec	18 Jul 2008 10:16:37 -0000	1.2
@@ -1,6 +1,6 @@
 Name:           cpqarrayd
 Version:        2.3        
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Cpqarrayd is a daemon to monitor HP (compaq) arraycontrollers
 Group:          System Environment/Base
 License:        GPLv2+
@@ -70,6 +70,9 @@
 %doc %_mandir/man1/cpqarrayd*
 
 %changelog
+* Fri Jul 18 2008 David Juran <djuran at redhat.com> - 2.3-4
+- Cleanup no-ida patch
+
 * Thu Jul 17 2008  <djuran at redhat.com> - 2.3-3
 - fix rpmlint warnings
 




More information about the fedora-extras-commits mailing list