rpms/raidutils/devel raidutils-rpm.patch, NONE, 1.1 raidutils.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Dominik Mierzejewski rathann at fedoraproject.org
Sun Apr 5 21:40:40 UTC 2009


Author: rathann

Update of /cvs/pkgs/rpms/raidutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27005

Modified Files:
	.cvsignore sources 
Added Files:
	raidutils-rpm.patch raidutils.spec 
Log Message:
initial import into devel branch


raidutils-rpm.patch:

--- NEW FILE raidutils-rpm.patch ---
diff -upwbB raidutils-0.0.6/include/device.hh.r raidutils-0.0.6/include/device.hh
--- raidutils-0.0.6/include/device.hh.r	2005-01-24 10:41:03.000000000 +0100
+++ raidutils-0.0.6/include/device.hh	2008-09-12 13:41:58.000000000 +0200
@@ -27,6 +27,14 @@
  */
 
 // Data unique to every engine device
+
+
+// use PACK for things that should be packed;
+// PACK_A for things that you'd like packed by would give a
+// warning on anything except an ARM if actually packed; and
+// PACK_WAS if it used to be packed by this gave warnings
+// everywhere so now it isn't.
+
 #undef PACK
 #if (defined(__GNUC__))
 # define PACK __attribute__ ((packed))
@@ -34,11 +42,17 @@
 #define PACK
 #endif
 
+#ifdef __arm__
+# define PACK_A PACK
+#else
+# define PACK_A
+#endif
+
 uSHORT		scsiOffset;	// 0=Async mode
 				// Non-zero = SCSI offset
 uSHORT		xfrSpeed;	// SCSI transfer speed
-dptCcapacity_S	capacity PACK;	// Device capacity
-dptCemuParam_S	emulation PACK;	// Emulated drive parameters
+dptCcapacity_S	capacity PACK_A;	// Device capacity
+dptCemuParam_S	emulation PACK_A;	// Emulated drive parameters
   // DPT specific name (ASCII string)
   // (Up to 8 valid chars + NULL terminator + 1)
 uCHAR		dptName[DPT_NAME_SIZE+2];
diff -upwbB raidutils-0.0.6/include/get_info.h.r raidutils-0.0.6/include/get_info.h
--- raidutils-0.0.6/include/get_info.h.r	2005-01-24 10:41:03.000000000 +0100
+++ raidutils-0.0.6/include/get_info.h	2008-09-12 13:41:58.000000000 +0200
@@ -364,6 +364,12 @@ const uLONG DPT_ENGINE_COMPATIBILITY   =
    #include    "device.hh"
    #include    "raid_dev.hh"
 
+     // use PACK for things that should be packed;
+     // PACK_A for things that you'd like packed by would give a
+     // warning on anything except an ARM if actually packed; and
+     // PACK_WAS if it used to be packed by this gave warnings
+     // everywhere so now it isn't.
+
 #undef PACK
 #if (defined(__GNUC__))
 # define PACK __attribute__ ((packed))
@@ -371,6 +377,14 @@ const uLONG DPT_ENGINE_COMPATIBILITY   =
 #define PACK
 #endif
 
+#ifdef __arm__
+# define PACK_A PACK
+#else
+# define PACK_A
+#endif
+
+#define PACK_WAS
+
    uSHORT flags2;        // Supplemental flags word
    uSHORT hbaIndex; // HBA index # (slot #)
    uSHORT hbaFlags; // HBA flags - see bit definitions below
@@ -381,8 +395,8 @@ const uLONG DPT_ENGINE_COMPATIBILITY   =
    uLONG  hbaTag    PACK;     // Reserved for future expansion
    uLONG  flags3    PACK;     // Miscellaneous flags - see bit definitions above
    uSHORT busSpeed  PACK;     // Negotiated bus speed (in Mhz)
-   uCHAR  p2Flags   PACK;     // Path 2 flags - see bit definitions above
-   uCHAR  reserved4 PACK;     // Reserved for future expansion
+   uCHAR  p2Flags   PACK_WAS;	// Path 2 flags - see bit definitions above
+   uCHAR  reserved4 PACK_WAS;	// Reserved for future expansion
    uLONG  availableCapacity PACK;     // Reserved for future expansion
 
    uCHAR  udmaModeSupported;// The maximum UDMA mode supported
diff -upwbB raidutils-0.0.6/include/hba.hh.r raidutils-0.0.6/include/hba.hh
--- raidutils-0.0.6/include/hba.hh.r	2005-01-24 10:41:03.000000000 +0100
+++ raidutils-0.0.6/include/hba.hh	2008-09-12 13:41:58.000000000 +0200
@@ -34,13 +34,13 @@
 #define PACK
 #endif
 
-   dptIOaddr_U ioAddr PACK;             // EISA/ISA/PCI address
+   dptIOaddr_U ioAddr PACK_A;             // EISA/ISA/PCI address
    uSHORT drvrRefNum;         // Number by which the driver ref-
 					// erences this HBA
 #if defined (_DPT_STRICT_ALIGN)
    uSHORT sniAdjust4;
 #endif
-   dptHBAid_U  id PACK;       // EISA = ID PAL bytes
+   dptHBAid_U  id PACK_A;       // EISA = ID PAL bytes
 					// ISA = Not used
 					// PCI = vendor ID, product ID
    uSHORT drqNum;             // DRQ # (0,5,6,7,0xffff=invalid)
@@ -80,7 +80,7 @@
    uCHAR  raidID;        // Software selectable RAID ID #
    uCHAR  slotID;        // Slot specific RAID ID #
 
-   dptChanInfo_S chanInfo[NUM_CHAN_INFO] PACK; // SCSI channel info (multi-channel boards)
+   dptChanInfo_S chanInfo[NUM_CHAN_INFO] PACK_A; // SCSI channel info (multi-channel boards)
 
    uCHAR  excludeStart;
    uCHAR  excludeEnd;
diff -upwbB raidutils-0.0.6/include/linux/i2o-dev.h.r raidutils-0.0.6/include/linux/i2o-dev.h
--- raidutils-0.0.6/include/linux/i2o-dev.h.r	2005-01-24 10:25:21.000000000 +0100
+++ raidutils-0.0.6/include/linux/i2o-dev.h	2008-09-12 13:41:58.000000000 +0200
@@ -24,7 +24,6 @@
 /* How many controllers are we allowing */
 #define MAX_I2O_CONTROLLERS	32
 
-#include <linux/compiler.h>
 
 #ifndef __KERNEL__
 
diff -upwbB raidutils-0.0.6/include/mgr.hh.r raidutils-0.0.6/include/mgr.hh
--- raidutils-0.0.6/include/mgr.hh.r	2005-01-24 10:41:03.000000000 +0100
+++ raidutils-0.0.6/include/mgr.hh	2008-09-12 13:41:58.000000000 +0200
@@ -34,8 +34,8 @@
 #define PACK
 #endif
 
-   dptCaddr_S	maxAddr PACK;	// Maximum physical address supported
-   dptCaddr_S	minAddr PACK;	// Minimum physical address supported
+   dptCaddr_S	maxAddr PACK_A;	// Maximum physical address supported
+   dptCaddr_S	minAddr PACK_A;	// Minimum physical address supported
 
 // RAID manager information (Ignore if not a RAID manager)
 
diff -upwbB raidutils-0.0.6/lib/engcalls.cpp.r raidutils-0.0.6/lib/engcalls.cpp
--- raidutils-0.0.6/lib/engcalls.cpp.r	2005-01-24 10:41:04.000000000 +0100
+++ raidutils-0.0.6/lib/engcalls.cpp	2008-09-12 13:41:58.000000000 +0200
@@ -987,7 +987,7 @@ char *AllocBuffers(uLONG toEngSize, uLON
 
   /* The Attach Failed, So DeAllocate The Shared Memory */
 
-        if((int)SharedMemoryPtr == -1)
+        if((long)SharedMemoryPtr == -1)
           {
             shmctl(BufferID,IPC_RMID,&shm_buff);
             SharedMemoryPtr = NULL;
diff -upwbB raidutils-0.0.6/lib/engmsg.c.r raidutils-0.0.6/lib/engmsg.c
--- raidutils-0.0.6/lib/engmsg.c.r	2005-01-24 10:41:04.000000000 +0100
+++ raidutils-0.0.6/lib/engmsg.c	2008-09-12 13:41:58.000000000 +0200
@@ -152,7 +152,7 @@ int MessageDPTEngine(int EngineMsgKey,in
      //
      // Send off the message to the engine
      //
-     if(i = msgsnd(msqID,(struct msgbuf *)&HdrBuff,MsgDataSize,0) != -1)
+     if((i = msgsnd(msqID,(struct msgbuf *)&HdrBuff,MsgDataSize,0)) != -1)
       {
         //
         // Let's set up a little loop here receiving messages in case
diff -upwbB raidutils-0.0.6/lib/lockunix.c.r raidutils-0.0.6/lib/lockunix.c
--- raidutils-0.0.6/lib/lockunix.c.r	2005-01-24 10:41:04.000000000 +0100
+++ raidutils-0.0.6/lib/lockunix.c	2008-09-12 13:43:22.000000000 +0200
@@ -30,6 +30,7 @@
  * UNIX locking mechanism
  */
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -82,7 +83,7 @@ MkLock (char * name)
 		return (-1);
 	}
 	sprintf (templateBuffer, Template, Name);
-	if ((fd = open(mktemp (templateBuffer), O_WRONLY|O_CREAT|O_EXCL)) < 0) {
+	if ((fd = open(mktemp (templateBuffer), O_WRONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR)) < 0) {
 		free (templateBuffer);
 		free (lock);
 		return (-1);
@@ -152,7 +153,7 @@ ChLock (char * name, int pid)
 
 	if (lock != (char *)NULL) {
 		sprintf (lock, Lock, Name);
-	    if ((fd = open(lock, O_WRONLY|O_CREAT|O_TRUNC)) >= 0) {
+	    if ((fd = open(lock, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR)) >= 0) {
 			sprintf (buffer, "%d\n", pid);
 			write (fd, buffer, strlen(buffer));
 			close (fd);
diff -upwbB raidutils-0.0.6/raideng/connect.hpp.r raidutils-0.0.6/raideng/connect.hpp
--- raidutils-0.0.6/raideng/connect.hpp.r	2005-01-24 10:41:05.000000000 +0100
+++ raidutils-0.0.6/raideng/connect.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -189,7 +189,7 @@ public:
 
 // Constructor/Destructor.............................
 
-			dptSCSIcon_C::dptSCSIcon_C();
+			dptSCSIcon_C();
 
 // Message Handlers...................................
 
diff -upwbB raidutils-0.0.6/raideng/eng_unix.cpp.r raidutils-0.0.6/raideng/eng_unix.cpp
--- raidutils-0.0.6/raideng/eng_unix.cpp.r	2005-01-24 10:41:04.000000000 +0100
+++ raidutils-0.0.6/raideng/eng_unix.cpp	2008-09-12 13:41:58.000000000 +0200
@@ -491,7 +491,7 @@ main(int argc, char *argv[])
 
   /* Make Sure That We Could Attach */
 
-            if((int)toEng_P != -1)
+            if((long)toEng_P != -1)
               {
                  fromEng_P = toEng_P + HdrBuff.FromEngBuffOffset;
 
@@ -909,7 +909,7 @@ void DisplayHelp(void)
 #else
 void DisplayHelp(void)
   {
-    printf("The Pramaters For This Program Are :\n");
+    printf("The Parameters For This Program Are :\n");
     printf(
 "  /VERBOSE            :  Display All Connection And Message Information\n");
     printf(
diff -upwbB raidutils-0.0.6/raideng/i2odep.h.r raidutils-0.0.6/raideng/i2odep.h
--- raidutils-0.0.6/raideng/i2odep.h.r	2005-01-24 10:41:05.000000000 +0100
+++ raidutils-0.0.6/raideng/i2odep.h	2008-09-12 13:41:58.000000000 +0200
@@ -203,7 +203,7 @@ typedef unsigned char BOOL;
 # define _F_set12bit4(w,x,y,z,u) ((w)->z = (u))
 # define _F_get16bit(w,x,y,z)    ((U16)((w)->z))
 # define _F_set16bit(w,x,y,z,u)  ((w)->z = (u))
-#elif (defined(_DPT_BIG_ENDIAN))
+#elif (defined(_DPT_BIG_ENDIAN) || defined(sparc))
 /* First 12 bits */
 # define _F_getTID(w,x,y)     getL12bit(w,x,0)
 # define _F_setTID(w,x,y,z)   setL12bit(w,x,0,z)
diff -upwbB raidutils-0.0.6/raideng/osd_unix.cpp.r raidutils-0.0.6/raideng/osd_unix.cpp
--- raidutils-0.0.6/raideng/osd_unix.cpp.r	2005-01-24 10:41:05.000000000 +0100
+++ raidutils-0.0.6/raideng/osd_unix.cpp	2008-09-12 13:41:58.000000000 +0200
@@ -164,6 +164,10 @@ typedef struct dpt_scsi_ha      HbaInfo;
 #define TO_LOGGER_BUFFER_SIZE    0x1000
 #define FROM_LOGGER_BUFFER_SIZE  0x10000
 
+/* Definitions - Device names -----------------------------------------------*/
+
+char *DEV_CTL = "/dev/i2octl";	// formerly /dev/i2o/ctl
+
 /* Function Prototypes ------------------------------------------------------*/
 
 DPT_RTN_T osdIOrequest(uSHORT ioMethod);
@@ -374,6 +378,17 @@ DPT_RTN_T osdIOrequest(uSHORT ioMethod)
 
    if(ioMethod==DPT_IO_PASS_THRU)
      {
+       // make sure the device entry represents an active device and not
+       // just a device file that was probed without actually finding a
+       // device, so we don't wait 20 seconds trying to connect to 
+       // it...
+       if(DefaultHbaDev->Flags == 0 )
+         {
+           FormatTimeString(TimeString,time(0));
+           printf("\nosdIDrequest   : %s Fatal error, DefaultHbaDev does not point to an active controller.\n", TimeString);
+           fflush(stdout);
+         }
+       else {
 
   /* Try To Open The First Adapter Device */
 
@@ -401,6 +416,7 @@ DPT_RTN_T osdIOrequest(uSHORT ioMethod)
        else printf("\nosdIOrequest : File %s Could Not Be Opened",
                      DefaultHbaDev->NodeName);
      }
+     }
    if(Verbose)
         printf("\nosdIOrequest   : Return = %x",retVal);
    return(retVal);
@@ -501,6 +517,15 @@ DPT_RTN_T osdOpenEngine(void)
    retVal = MSG_RTN_COMPLETED;
    NumHBAs = BuildNodeNameList();
 
+   // If there are no HBAs found, abort with an explict error message.
+   if(NumHBAs == 0)
+     {
+     FormatTimeString(TimeString,time(0));
+     printf("\nosdOpenEngine  : %s Fatal error, no active controller device files found.\n", TimeString);
+     retVal = MSG_RTN_FAILED;
+     fflush(stdout);
+     }
+
    if(Verbose)
      {
         FormatTimeString(TimeString,time(0));
@@ -1232,7 +1257,7 @@ DPT_RTN_T osdSendMessage(uLONG HbaNum, P
 #elif defined (_DPT_SCO) || defined (SNI_MIPS) || defined(_DPT_SOLARIS) || defined(_DPT_BSDI) || defined(_DPT_FREE_BSD) || defined(_DPT_LINUX)
 
 #if defined(_DPT_LINUX_I2O)
-		     if(strcmp(HbaDevs[HbaNum].NodeName, "/dev/i2o/ctl"))
+		     if(strcmp(HbaDevs[HbaNum].NodeName, DEV_CTL))
                         i = ioctl(FileID,I2OUSRCMD,IoctlBuffer_P);
 		     else {
                         struct i2o_cmd_passthru pt;
@@ -2144,7 +2169,7 @@ DPT_RTN_T osdGetCtlrs(uSHORT ioMethod,uS
                        i = 0;
                 }
 #elif defined(_DPT_LINUX_I2O)
-                if(strcmp(HbaDevs[Count].NodeName, "/dev/i2o/ctl"))
+                if(strcmp(HbaDevs[Count].NodeName, DEV_CTL))
                    i = osdSendIoctl(&HbaDevs[Count],DPT_CTRLINFO,DataBuff,&pkt);
 		else {
 		   /*
@@ -2367,7 +2392,7 @@ DPT_RTN_T osdGetSysInfo(sysInfo_S *SysIn
        SysInfo_P->busType = SI_PCI_BUS;
        SysInfo_P->processorFamily = PROC_INTEL;
        buffer_size = sysinfo(SI_ARCHITECTURE, buffer_ptr, 0);
-       buffer_ptr = (char *)malloc((int)buffer_size);
+       buffer_ptr = (char *)malloc((size_t)buffer_size);
        status = sysinfo(SI_ARCHITECTURE, buffer_ptr, buffer_size);
        if (status != -1)
         {
@@ -2647,7 +2672,7 @@ int BufferAlloc(uLONG toLoggerSize, char
 
   /* The Attach Failed, So DeAllocate The Shared Memory */
 
-            if((int)SharedMemoryPtr == -1)
+            if((long)SharedMemoryPtr == -1)
               {
                 Rtnval = 1;
                 shmctl(BufferID,IPC_RMID,&shm_buff);
@@ -2782,7 +2807,7 @@ int BufferAlloc(uLONG toLoggerSize, char
         toLoggerTotalSize = toLoggerSize + sizeof(dptBuffer_S);
         fromLoggerTotalSize = fromEngSize + sizeof(dptBuffer_S);
         FromLoggerBuffOffset = toLoggerTotalSize;
-        Ptr = (char *)malloc((uINT)(toLoggerTotalSize + fromLoggerTotalSize));
+        Ptr = (char *)malloc((size_t)(toLoggerTotalSize + fromLoggerTotalSize));
         if(Ptr != NULL)
           {
             *toLogger_P_P = Ptr;
@@ -3421,7 +3446,7 @@ void *osdAllocIO(uLONG size)
  {
    void *Rtnval;
 
-   Rtnval = (void *)malloc((uINT)size);
+   Rtnval = (void *)malloc((size_t)size);
    if(Verbose)
      {
        FormatTimeString(TimeString,time(0));
@@ -3743,16 +3768,56 @@ uSHORT BuildNodeNameList(void)
    NumEntries = 0;
 
 #  if (defined(_DPT_LINUX_I2O))
+   uCHAR LinuxI2ODataBuff[MAX_I2O_CONTROLLERS];
+
    memset(&pkt, 0, sizeof(EATA_CP));
    HbaDevs[NumEntries].Flags = 0;
-   strcpy(HbaDevs[NumEntries].NodeName, "/dev/i2o/ctl");
-   IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries], I2OGETIOPS, (uCHAR *)&NumEntries, &pkt);
+   strcpy(HbaDevs[NumEntries].NodeName, DEV_CTL);
+   IoctlRtn = osdSendIoctl(&HbaDevs[NumEntries], I2OGETIOPS, LinuxI2ODataBuff, &pkt);
    if(!IoctlRtn) {
-     for(i = 0; i < NumEntries; i ++) {
-       HbaDevs[i].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B;
-       HbaDevs[i].IoAddress = UINTPTR_MAX;
-       strcpy(HbaDevs[i].NodeName, "/dev/i2o/ctl");
+     // step through the returned data buffer and look for the 
+     // non-zero entries, which indicate an active IOP.  For each
+     // one we find, add a corresponding entry in HbaDevs.
+     for(i = 0; i < MAX_I2O_CONTROLLERS; i ++) {
+       if ( LinuxI2ODataBuff[i] != 0  ) 
+        {
+          if(NumEntries >= MAX_HAS)
+           {
+             FormatTimeString(TimeString,time(0));
+
+             printf("\nBuildNodeNameList  : %s Warning: Found more than %d Linux I2O Controlers; ignoring those that won't fit in the HbaDevs array.",
+                    TimeString, MAX_HAS);
+
+             fflush(stdout);
+             break;
+            }
+          if(Verbose)
+            {
+              FormatTimeString(TimeString,time(0));
+
+              printf("\nBuildNodeNameList  : %s Found Linux I2O Controler, using %s device file for utility-relative controller number %d.",
+                     TimeString, DEV_CTL, NumEntries);
+
+              fflush(stdout);
+            }
+
+          HbaDevs[NumEntries].Flags = NODE_FILE_VALID_HBA_B | NODE_FILE_I2O_HBA_B;
+          HbaDevs[NumEntries].IoAddress = UINTPTR_MAX;
+          strcpy(HbaDevs[NumEntries].NodeName, DEV_CTL);
+
+          ++NumEntries;
+        }
+       else {
+              // for now, we'll assume that all the active IOP entries
+              // are at the front of the returned buffer.  In order to
+              // support "gaps", we'd need to record the IOP index in the
+              // NodeFiles_S structure and use that instead of HbaNum when
+              // we call the I2OPASSTHRU ioctl (or make sure that
+              // everything that looks at HbaDevs can handle inactive
+              // entries in the middle of the array).
+              break;
      }
+     } // for(i = 0; i < MAX_I2O_CONTROLLERS; i ++) 
    }
 #  endif
 
diff -upwbB raidutils-0.0.6/raideng/raid.h.r raidutils-0.0.6/raideng/raid.h
--- raidutils-0.0.6/raideng/raid.h.r	2005-01-24 10:41:04.000000000 +0100
+++ raidutils-0.0.6/raideng/raid.h	2008-09-12 13:41:58.000000000 +0200
@@ -271,7 +271,7 @@ struct raidDef_S : public raidDefinition
 
 // Constructor/Destructor.............................
 
-			raidDef_S::raidDef_S();
+			raidDef_S();
 
 };
 #endif  // c++
diff -upwbB raidutils-0.0.6/raideng/unreslvd.cpp.r raidutils-0.0.6/raideng/unreslvd.cpp
--- raidutils-0.0.6/raideng/unreslvd.cpp.r	2005-01-24 10:41:05.000000000 +0100
+++ raidutils-0.0.6/raideng/unreslvd.cpp	2008-09-12 13:41:58.000000000 +0200
@@ -34,7 +34,7 @@ extern "C"
    char *__nw__FUi(int size)
    {
         char *p;
-        p = (char *)malloc(size);          
+        p = (char *)malloc((size_t)size);
         return(p);
    }
 
diff -upwbB raidutils-0.0.6/raidutil/alarm.hpp.r raidutils-0.0.6/raidutil/alarm.hpp
--- raidutils-0.0.6/raidutil/alarm.hpp.r	2005-01-24 10:41:07.000000000 +0100
+++ raidutils-0.0.6/raidutil/alarm.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -58,7 +58,7 @@ enum AlarmCommand { None, On, Off, Enabl
 class AlarmStatus:public Command
 	{
 	public:
-		AlarmStatus::AlarmStatus( int hba, AlarmCommand cmd );							
+		AlarmStatus( int hba, AlarmCommand cmd );
 		AlarmStatus( const AlarmStatus &new_AlarmStatus );
 		virtual	~AlarmStatus();
 		AlarmStatus	&operator = ( AlarmStatus &right );
diff -upwbB raidutils-0.0.6/raidutil/command.cpp.r raidutils-0.0.6/raidutil/command.cpp
--- raidutils-0.0.6/raidutil/command.cpp.r	2005-01-24 10:41:07.000000000 +0100
+++ raidutils-0.0.6/raidutil/command.cpp	2008-09-12 13:41:58.000000000 +0200
@@ -2237,13 +2237,14 @@ void Command::MakeArrayOptimal(DPT_TAG_T
 }
 
 
-#ifdef sparc
-# define VOLATILE volatile
-#else
-# define VOLATILE
-#endif
-
-extern "C" { VOLATILE void exit (int);}
+//// Comment out this stuff, for Debian.
+// #ifdef sparc
+// # define VOLATILE volatile
+// #else
+// # define VOLATILE
+// #endif
+//
+// extern "C" { VOLATILE void exit (int);}
 
 void Command::Init_Engine(int scanHbasOnly)
 {
diff -upwbB raidutils-0.0.6/raidutil/eventlog.hpp.r raidutils-0.0.6/raidutil/eventlog.hpp
--- raidutils-0.0.6/raidutil/eventlog.hpp.r	2005-01-24 10:41:07.000000000 +0100
+++ raidutils-0.0.6/raidutil/eventlog.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -77,7 +77,7 @@ class EventLog:public Command
 	{
 
 	public:
-		EventLog::EventLog(SCSI_Addr_List *deviceList, 
+		EventLog(SCSI_Addr_List *deviceList,
             EventLogOptions cmd);
 		EventLog(const EventLog &new_EventLog);
 		virtual	~EventLog();
diff -upwbB raidutils-0.0.6/raidutil/expand.hpp.r raidutils-0.0.6/raidutil/expand.hpp
--- raidutils-0.0.6/raidutil/expand.hpp.r	2005-01-24 10:41:07.000000000 +0100
+++ raidutils-0.0.6/raidutil/expand.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -55,7 +55,7 @@
 class Expand:public Command
 {
    public:
-      Expand::Expand (SCSI_Address raid, SCSI_Addr_List *list);
+		Expand (SCSI_Address raid, SCSI_Addr_List *list);
 		Expand (const Expand &new_Expand);
 		virtual ~Expand();
 		Expand &operator = (Expand &right);
diff -upwbB raidutils-0.0.6/raidutil/forcest.hpp.r raidutils-0.0.6/raidutil/forcest.hpp
--- raidutils-0.0.6/raidutil/forcest.hpp.r	2005-01-24 10:41:07.000000000 +0100
+++ raidutils-0.0.6/raidutil/forcest.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -65,7 +65,7 @@ enum ForceStateOptions { Optimal, Fail, 
 class ForceState:public Command
 	{
 	public:
-		ForceState::ForceState(SCSI_Addr_List *deviceList, ForceStateOptions cmd);
+		ForceState(SCSI_Addr_List *deviceList, ForceStateOptions cmd);
 		ForceState(const ForceState &new_ForceState);
 		virtual	~ForceState();
 
diff -upwbB raidutils-0.0.6/raidutil/namarray.hpp.r raidutils-0.0.6/raidutil/namarray.hpp
--- raidutils-0.0.6/raidutil/namarray.hpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/namarray.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -58,7 +58,7 @@ class NameArray:public Command
 {
 
 	public:
-		NameArray::NameArray(SCSI_Address arrayToName, char *arrayName);
+		NameArray(SCSI_Address arrayToName, char *arrayName);
 		NameArray(const NameArray &new_NameArray);
 		virtual	~NameArray();
 
diff -upwbB raidutils-0.0.6/raidutil/parser.cpp.r raidutils-0.0.6/raidutil/parser.cpp
--- raidutils-0.0.6/raidutil/parser.cpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/parser.cpp	2008-09-12 13:41:58.000000000 +0200
@@ -730,6 +730,7 @@ DELETE_HOT_SPARE:
                     {
                              EventLog *temp = new EventLog (components, eventLogOpts);
                              cmd_List->add_Item (*temp);
+                             delete temp;
                     }
                     else
                         Error_in_Parsing(EventStrings[STR_PARSE_ERR_MUST_SPECIFY_ADDRESS], this_Commands_Text);
diff -upwbB raidutils-0.0.6/raidutil/rmwflash.hpp.r raidutils-0.0.6/raidutil/rmwflash.hpp
--- raidutils-0.0.6/raidutil/rmwflash.hpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/rmwflash.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -59,7 +59,7 @@ class RMWFlash:public Command
 {
 
         public:
-                RMWFlash::RMWFlash(int hbaNo, char *Data, int Region, unsigned long Offset, unsigned Size);
+                RMWFlash(int hbaNo, char *Data, int Region, unsigned long Offset, unsigned Size);
                 RMWFlash(const RMWFlash &new_RMWFlash);
                 virtual ~RMWFlash();
 
diff -upwbB raidutils-0.0.6/raidutil/segment.hpp.r raidutils-0.0.6/raidutil/segment.hpp
--- raidutils-0.0.6/raidutil/segment.hpp.r	2005-01-24 10:41:07.000000000 +0100
+++ raidutils-0.0.6/raidutil/segment.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -51,7 +51,7 @@ class arraySegment:public Command
 {
 
 	public:
-		arraySegment::arraySegment(SCSI_Address raidToSeg, uLONG segSize[8], uLONG segOffset[8], bool showSeg);
+		arraySegment(SCSI_Address raidToSeg, uLONG segSize[8], uLONG segOffset[8], bool showSeg);
 		arraySegment(const arraySegment &new_arraySegment);
 		virtual	~arraySegment();
 
diff -upwbB raidutils-0.0.6/raidutil/setcache.hpp.r raidutils-0.0.6/raidutil/setcache.hpp
--- raidutils-0.0.6/raidutil/setcache.hpp.r	2005-01-24 10:41:07.000000000 +0100
+++ raidutils-0.0.6/raidutil/setcache.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -55,7 +55,7 @@
 class SetCache:public Command
 	{
 	public:
-		SetCache::SetCache(
+		SetCache(
 				SCSI_Addr_List	*addresses,		// a list of addresses
 				int				on,				// Whether to enable or disable
 				int				rw				// Read or write cacheing.
diff -upwbB raidutils-0.0.6/raidutil/setrate.hpp.r raidutils-0.0.6/raidutil/setrate.hpp
--- raidutils-0.0.6/raidutil/setrate.hpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/setrate.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -59,8 +59,8 @@ class SetRate: public Command
 	public:
 
 		// Set the (global) rebuild rate
-        SetRate::SetRate(int rate, SCSI_Addr_List *objs);
-        SetRate::SetRate(const SetRate &right);
+		SetRate(int rate, SCSI_Addr_List *objs);
+		SetRate(const SetRate &right);
 		virtual	~SetRate();
 
 		Dpt_Error execute(String_List **output);
diff -upwbB raidutils-0.0.6/raidutil/setscfg.hpp.r raidutils-0.0.6/raidutil/setscfg.hpp
--- raidutils-0.0.6/raidutil/setscfg.hpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/setscfg.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -59,7 +59,7 @@ class setscfg:public Command
 {
 
 	public:
-		setscfg::setscfg();
+		setscfg();
 		virtual	~setscfg();
 
 		Dpt_Error execute(String_List **output);
diff -upwbB raidutils-0.0.6/raidutil/taskctrl.hpp.r raidutils-0.0.6/raidutil/taskctrl.hpp
--- raidutils-0.0.6/raidutil/taskctrl.hpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/taskctrl.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -59,7 +59,7 @@ enum TaskCommandOptions { List, Build, R
 class TaskControl:public Command
 	{
 	public:
-		TaskControl::TaskControl(SCSI_Addr_List *deviceList, TaskCommandOptions cmd);
+		TaskControl(SCSI_Addr_List *deviceList, TaskCommandOptions cmd);
 		TaskControl(const TaskControl &new_TaskControl);
 		virtual	~TaskControl();
 
diff -upwbB raidutils-0.0.6/raidutil/uartdmp.hpp.r raidutils-0.0.6/raidutil/uartdmp.hpp
--- raidutils-0.0.6/raidutil/uartdmp.hpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/uartdmp.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -59,7 +59,7 @@ class UartDmp:public Command
 {
 
 	public:
-		UartDmp::UartDmp(int hbaNo, char *fileName);
+		UartDmp(int hbaNo, char *fileName);
 		UartDmp(const UartDmp &new_UartDmp);
 		virtual	~UartDmp();
 
diff -upwbB raidutils-0.0.6/raidutil/zap.hpp.r raidutils-0.0.6/raidutil/zap.hpp
--- raidutils-0.0.6/raidutil/zap.hpp.r	2005-01-24 10:41:06.000000000 +0100
+++ raidutils-0.0.6/raidutil/zap.hpp	2008-09-12 13:41:58.000000000 +0200
@@ -55,7 +55,7 @@
 class Zap:public Command
 	{
 	public:
-		Zap::Zap(
+		Zap(
 				SCSI_Addr_List	*addresses,  // a list of addresses
             int resync = 0            // (send reset to hba or not)
       );								         // to delete raid tables on


--- NEW FILE raidutils.spec ---
Summary: Utilities to manage Adaptec I2O compliant RAID controllers
Name: raidutils
Version: 0.0.6
Release: 2%{?dist}
License: BSD
Group: Applications/System
URL: http://i2o.shadowconnect.com/
Source: http://i2o.shadowconnect.com/raidutils/%{name}-%{version}.tar.bz2
# based on http://ftp.de.debian.org/debian/pool/main/r/raidutils/raidutils_0.0.6-8.diff.gz
Patch0: %{name}-rpm.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)

%description
The raidutils program allow the user to manage the Adaptec I2O compliant RAID
controllers. It can, for example, create/delete an RAID array, add/remove a hot
spare drive to/from a RAID array, activate/silence the alarm or get information
about the status of the RAID array and disks.

%prep
%setup -q
%patch0 -p1 -b .r

%build
%configure --disable-static --disable-dependency-tracking
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot}
rm %{buildroot}%{_libdir}/libraidutil.{la,so}

%{__mkdir} -p %{buildroot}%{_sysconfdir}/sysconfig/modules

cat << __EOF__ >> %{buildroot}%{_sysconfdir}/sysconfig/modules/raidutils.modules
#!/bin/sh
modprobe i2o_config >/dev/null 2>&1
__EOF__
chmod 755 %{buildroot}%{_sysconfdir}/sysconfig/modules/raidutils.modules

%clean
%{__rm} -rf %{buildroot}

%post
/sbin/ldconfig
modprobe i2o_config >/dev/null 2>&1 || :

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING
%{_sysconfdir}/sysconfig/modules/raidutils.modules
%{_bindir}/raidutil
%{_bindir}/raideng
%{_libdir}/libraidutil.so.*

%changelog
* Wed Dec 31 2008 Dominik Mierzejewski <rpm at greysector.net> 0.0.6-2
- added i2o_config module autoloading
- drop redundant BR: gcc-c++

* Fri Sep 12 2008 Dominik Mierzejewski <rpm at greysector.net> 0.0.6-1
- adapted for Fedora/EPEL
- disabled building static library
- extracted relevant bits from Debian patch
- fixed build with recent glibc

* Thu Jun 08 2006 Stephan Lauffer <lauffer at ph-freiburg.de>
- patch raidutils-gcc++-4.1-patch.diff fixes compiler errors with gcc-c++-4.1.0
  This patch is taken from the fix in http://bugs.debian.org/356366
* Mon Jan 24 2005 Markus Lidel <Markus.Lidel at shadowconnect.com>
- New version for FC3.
* Wed May 18 2004 Markus Lidel <Markus.Lidel at shadowconnect.com>
- Compiled with new kernel interface.
* Wed May 05 2004 Markus Lidel <Markus.Lidel at shadowconnect.com>
- Changed recognition of I2O pass-thru option availability.
- Now raidutils use the right headers if using gcc version 3.3.
* Mon May 03 2004 Markus Lidel <Markus.Lidel at shadowconnect.com>
- Cleaned up RPM regarding the guideline of Anvil, warren and mschwendt. Many
  thanks to them.
* Sun May 02 2004 Markus Lidel <Markus.Lidel at shadowconnect.com>
- first version with SPEC file to build a rpm.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/raidutils/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	24 Mar 2009 17:33:19 -0000	1.1
+++ .cvsignore	5 Apr 2009 21:40:10 -0000	1.2
@@ -0,0 +1 @@
+raidutils-0.0.6.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/raidutils/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	24 Mar 2009 17:33:20 -0000	1.1
+++ sources	5 Apr 2009 21:40:10 -0000	1.2
@@ -0,0 +1 @@
+d32ed6789a11dca51cbc6d4428e26d8b  raidutils-0.0.6.tar.bz2




More information about the scm-commits mailing list