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
@@ -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])
-dnl Check for pathed kernel sources with ida_ioctl.h
-AC_MSG_CHECKING(for kernel sources)
-found_kernel_dir=""
-for kernel_dir in /usr/src/linux /usr/src/linux-2.4
-do
- if test -d $kernel_dir ; then
- CFLAGS="$CFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
- CPPFLAGS="$CPPFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
- found_kernel_dir="$kernel_dir"
- fi
-done
-
-if test "$found_kernel_dir" != "" ; then
- AC_MSG_RESULT(found $found_kernel_dir )
-else
- AC_MSG_ERROR(Kernel sources not found)
-fi
+dnl dnl Check for pathed kernel sources with ida_ioctl.h
+dnl AC_MSG_CHECKING(for kernel sources)
+dnl found_kernel_dir=""
+dnl for kernel_dir in /usr/src/linux /usr/src/linux-2.4
+dnl do
+dnl if test -d $kernel_dir ; then
+dnl CFLAGS="$CFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
+dnl CPPFLAGS="$CPPFLAGS -I$kernel_dir/include -I$kernel_dir/drivers/block"
+dnl found_kernel_dir="$kernel_dir"
+dnl fi
+dnl done
+
+dnl if test "$found_kernel_dir" != "" ; then
+dnl AC_MSG_RESULT(found $found_kernel_dir )
+dnl else
+dnl AC_MSG_ERROR(Kernel sources not found)
+dnl fi
dnl Check for compile.h (2.6.x kernels only?
AC_CHECK_HEADERS(linux/compiler.h)
-dnl Check Headers
-AC_CHECK_HEADERS(ida_ioctl.h ida_cmd.h cpqarray.h,,
- AC_MSG_ERROR(You need to have the SmartArray driver in the kernel.))
-
-dnl Check version of SmartArray driver
-AC_MSG_CHECKING(SmartArray driver version)
-AC_EGREP_HEADER(blk_cnt, ida_ioctl.h,AC_MSG_RESULT(ok),
- AC_MSG_ERROR(You need to have the SmartArray driver version 1.0.1 or higher installed.))
+dnl dnl Check Headers
+dnl AC_CHECK_HEADERS(ida_ioctl.h ida_cmd.h cpqarray.h,,
+dnl AC_MSG_ERROR(You need to have the SmartArray driver in the kernel.))
+
+dnl dnl Check version of SmartArray driver
+dnl AC_MSG_CHECKING(SmartArray driver version)
+dnl AC_EGREP_HEADER(blk_cnt, ida_ioctl.h,AC_MSG_RESULT(ok),
+dnl AC_MSG_ERROR(You need to have the SmartArray driver version 1.0.1 or higher installed.))
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 @@
#include <linux/compiler.h>
#endif
-#if defined(__linux__)
- #include <ida_ioctl.h>
-#endif
+/* #if defined(__linux__) */
+/* #include <ida_ioctl.h> */
+/* #endif */
#if defined(__freebsd__)
#include <idavar.h>
@@ -249,7 +249,7 @@ int main(int argc, char *argv[])
syslog(LOG_INFO, "Logging Enabled...");
while (keeprunning) {
- status_check(opts);
+/* status_check(opts); */
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];