Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 raidutils (0.0.6-23) unstable; urgency=medium
 .
   [ Ondřej Nový ]
   * d/changelog: Remove trailing whitespaces
 .
   [ Barak A. Pearlmutter ]
   * Bump debhelper from old 10 to 12.
   * Set debhelper-compat version in Build-Depends.
   * Bump policy
   * remove obsolete build dependency (closes: #959461)
   * Rules-Requires-Root: no
Author: Barak A. Pearlmutter <bap@debian.org>
Bug-Debian: https://bugs.debian.org/959461

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2020-05-02

--- raidutils-0.0.6.orig/Makefile.am
+++ raidutils-0.0.6/Makefile.am
@@ -1 +1,2 @@
 SUBDIRS=lib raidutil raideng
+ACLOCAL_AMFLAGS=-I m4
--- raidutils-0.0.6.orig/autogen.sh
+++ raidutils-0.0.6/autogen.sh
@@ -1,7 +1,3 @@
 #!/bin/sh
 
-libtoolize -c --force
-aclocal
-autoheader
-autoconf
-automake -c --add-missing
+autoreconf --install $*
--- /dev/null
+++ raidutils-0.0.6/configure.ac
@@ -0,0 +1,69 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([I2O RAID Utilities],[0.0.6],[],[i2o-raidutils],[http://i2o.shadowconnect.com])
+AC_CONFIG_SRCDIR([raidutil/raidutil.cpp])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([-Wall])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+AM_PROG_AR
+LT_INIT
+
+AX_CFLAGS_WARN_ALL
+AX_CHECK_COMPILE_FLAG([-Wno-write-strings], [CFLAGS="$CFLAGS -Wno-write-strings"])
+AX_CHECK_COMPILE_FLAG([-Wno-comments], [CFLAGS="$CFLAGS -Wno-comments"])
+AC_LANG([C++])
+AX_CXXFLAGS_WARN_ALL
+AX_CHECK_COMPILE_FLAG([-Wno-write-strings], [CXXFLAGS="$CXXFLAGS -Wno-write-strings"])
+AX_CHECK_COMPILE_FLAG([-Wno-comments], [CXXFLAGS="$CXXFLAGS -Wno-comments"])
+AC_LANG([C])
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_LANG([C])
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([fcntl.h malloc.h memory.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/systeminfo.h unistd.h values.h inttypes.h])
+AC_LANG([C++])
+AC_CHECK_HEADERS([strstream.h sstream fstream.h fstream iostream.h iostream iomanip.h iomanip])
+AC_LANG([C])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STAT
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+AC_C_VOLATILE
+
+# Checks for library functions.
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_FORK
+AC_PROG_GCC_TRADITIONAL
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_REALLOC
+
+AC_FUNC_STAT
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([alarm atexit dup2 memset strchr strcspn strpbrk strrchr strspn strstr strtol strtoul sysinfo uname])
+
+AM_PROG_CC_C_O
+
+AC_CONFIG_FILES([Makefile
+                 raideng/Makefile
+                 raidutil/Makefile
+                 lib/Makefile
+                 distribution/raidutils.spec])
+AC_OUTPUT
--- raidutils-0.0.6.orig/include/ctlr_map.hpp
+++ raidutils-0.0.6/include/ctlr_map.hpp
@@ -40,9 +40,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 17 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:19:50  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 #ifndef _NFILE
--- raidutils-0.0.6.orig/include/device.hh
+++ raidutils-0.0.6/include/device.hh
@@ -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];
--- raidutils-0.0.6.orig/include/dpt_scsi.h
+++ raidutils-0.0.6/include/dpt_scsi.h
@@ -757,7 +757,7 @@
    void         setLba(uLONG inLong) { setU1(this,3,inLong);
                                        setU1(this,2,inLong >> 8);
                                        setU1(this,1,((inLong >> 16L) & 0x1F)
-                                        | ((scReadWrite6_S __FAR__ *)(this))->getLun() & 0xE0); }
+                                        | (((scReadWrite6_S __FAR__ *)(this))->getLun() & 0xE0)); }
 #  define scReadWrite6_setLba(this,inLong) ((scReadWrite6_S __FAR__ *)(this))->setLba(inLong)
 
    uSHORT       getLength() { return getU1(this,4); }
@@ -5712,7 +5712,7 @@ const uCHAR FLG_SOC_ASK_TO_BOOT = 0x01;
         uSHORT          setSOCforceAccess(uCHAR chan, uSHORT inShort)   { return setU2(this,72+(2*chan),inShort); }
         void                    swapSOCforceAccess(uCHAR chan)                                          { osdSwap2((uSHORT __FAR__ *)getUP1(this,72+(2*chan))); }
 
-        // get the ID of the remote controler on chan X
+        // get the ID of the remote controller on chan X
         uCHAR                   getRemoteSOCid(uCHAR chan)
                 {
                         uCHAR rtnVal;
--- raidutils-0.0.6.orig/include/get_info.h
+++ raidutils-0.0.6/include/get_info.h
@@ -263,8 +263,8 @@ const uLONG DPT_ENGINE_COMPATIBILITY   =
   // 1=The device is emulated drive 1 (D:)
   // 0=The device is emulated drive 0 (C:)
 #define   FLG_DEV_EMU_01      0x0008
-  // 1=The device has removeable media
-#define   FLG_DEV_REMOVEABLE  0x0010
+  // 1=The device has removable media
+#define   FLG_DEV_REMOVABLE  0x0010
   // 1=The device originates in a logical device list
   // 0=The device originates in a physical object list
 #define FLG_DEV_LOGICAL       0x0020
@@ -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,19 +377,27 @@ 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
 #if defined (_DPT_STRICT_ALIGN)
    uSHORT sniAdjust3;
 #endif
-   uLONG  magicNum  PACK; // RAID magic #
-   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
-   uLONG  availableCapacity PACK;     // Reserved for future expansion
+   uLONG  magicNum  PACK;	// RAID magic #
+   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_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
    uCHAR  udmaModeSelected;	// The current operational UDMA mode
--- raidutils-0.0.6.orig/include/hba.hh
+++ raidutils-0.0.6/include/hba.hh
@@ -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;
--- raidutils-0.0.6.orig/include/linux/i2o-dev.h
+++ raidutils-0.0.6/include/linux/i2o-dev.h
@@ -13,32 +13,24 @@
  * This header file defines the I2O APIs that are available to both
  * the kernel and user level applications.  Kernel specific structures
  * are defined in i2o_osm. OSMs should include _only_ i2o_osm.h which
- * automatically includs this file.
+ * automatically includes this file.
  *
  */
 
 #ifndef _I2O_DEV_H
 #define _I2O_DEV_H
 
-#define __user
 /* How many controllers are we allowing */
 #define MAX_I2O_CONTROLLERS	32
 
-#include <linux/compiler.h>
-
-#ifndef __KERNEL__
-
-typedef unsigned char u8;
-typedef unsigned short u16;
-typedef unsigned int u32;
-
-#endif				/* __KERNEL__ */
+#include <linux/ioctl.h>
+#include <linux/types.h>
 
 /*
  * I2O Control IOCTLs and structures
  */
 #define I2O_MAGIC_NUMBER	'i'
-#define I2OGETIOPS		_IOR(I2O_MAGIC_NUMBER,0,u8[MAX_I2O_CONTROLLERS])
+#define I2OGETIOPS		_IOR(I2O_MAGIC_NUMBER,0,__u8[MAX_I2O_CONTROLLERS])
 #define I2OHRTGET		_IOWR(I2O_MAGIC_NUMBER,1,struct i2o_cmd_hrtlct)
 #define I2OLCTGET		_IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct)
 #define I2OPARMSET		_IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget)
@@ -46,7 +38,7 @@ typedef unsigned int u32;
 #define I2OSWDL 		_IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer)
 #define I2OSWUL 		_IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer)
 #define I2OSWDEL		_IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer)
-#define I2OVALIDATE		_IOR(I2O_MAGIC_NUMBER,8,u32)
+#define I2OVALIDATE		_IOR(I2O_MAGIC_NUMBER,8,__u32)
 #define I2OHTML 		_IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html)
 #define I2OEVTREG		_IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id)
 #define I2OEVTGET		_IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info)
@@ -55,27 +47,27 @@ typedef unsigned int u32;
 
 struct i2o_cmd_passthru32 {
 	unsigned int iop;	/* IOP unit number */
-	u32 msg;		/* message */
+	__u32 msg;		/* message */
 };
 
 struct i2o_cmd_passthru {
 	unsigned int iop;	/* IOP unit number */
-	void __user *msg;	/* message */
+	void *msg;	/* message */
 };
 
 struct i2o_cmd_hrtlct {
 	unsigned int iop;	/* IOP unit number */
-	void __user *resbuf;	/* Buffer for result */
-	unsigned int __user *reslen;	/* Buffer length in bytes */
+	void *resbuf;	/* Buffer for result */
+	unsigned int *reslen;	/* Buffer length in bytes */
 };
 
 struct i2o_cmd_psetget {
 	unsigned int iop;	/* IOP unit number */
 	unsigned int tid;	/* Target device TID */
-	void __user *opbuf;	/* Operation List buffer */
+	void *opbuf;	/* Operation List buffer */
 	unsigned int oplen;	/* Operation List buffer length in bytes */
-	void __user *resbuf;	/* Result List buffer */
-	unsigned int __user *reslen;	/* Result List buffer length in bytes */
+	void *resbuf;	/* Result List buffer */
+	unsigned int *reslen;	/* Result List buffer length in bytes */
 };
 
 struct i2o_sw_xfer {
@@ -83,19 +75,19 @@ struct i2o_sw_xfer {
 	unsigned char flags;	/* Flags field */
 	unsigned char sw_type;	/* Software type */
 	unsigned int sw_id;	/* Software ID */
-	void __user *buf;	/* Pointer to software buffer */
-	unsigned int __user *swlen;	/* Length of software data */
-	unsigned int __user *maxfrag;	/* Maximum fragment count */
-	unsigned int __user *curfrag;	/* Current fragment count */
+	void *buf;	/* Pointer to software buffer */
+	unsigned int *swlen;	/* Length of software data */
+	unsigned int *maxfrag;	/* Maximum fragment count */
+	unsigned int *curfrag;	/* Current fragment count */
 };
 
 struct i2o_html {
 	unsigned int iop;	/* IOP unit number */
 	unsigned int tid;	/* Target device ID */
 	unsigned int page;	/* HTML page */
-	void __user *resbuf;	/* Buffer for reply HTML page */
-	unsigned int __user *reslen;	/* Length in bytes of reply buffer */
-	void __user *qbuf;	/* Pointer to HTTP query string */
+	void *resbuf;	/* Buffer for reply HTML page */
+	unsigned int *reslen;	/* Length in bytes of reply buffer */
+	void *qbuf;	/* Pointer to HTTP query string */
 	unsigned int qlen;	/* Length in bytes of query string buffer */
 };
 
@@ -122,6 +114,10 @@ struct i2o_evt_get {
 	int lost;
 };
 
+typedef struct i2o_sg_io_hdr {
+	unsigned int flags;	/* see I2O_DPT_SG_IO_FLAGS */
+} i2o_sg_io_hdr_t;
+
 /**************************************************************************
  * HRT related constants and structures
  **************************************************************************/
@@ -136,53 +132,53 @@ struct i2o_evt_get {
 #define I2O_BUS_UNKNOWN 0x80
 
 typedef struct _i2o_pci_bus {
-	u8 PciFunctionNumber;
-	u8 PciDeviceNumber;
-	u8 PciBusNumber;
-	u8 reserved;
-	u16 PciVendorID;
-	u16 PciDeviceID;
+	__u8 PciFunctionNumber;
+	__u8 PciDeviceNumber;
+	__u8 PciBusNumber;
+	__u8 reserved;
+	__u16 PciVendorID;
+	__u16 PciDeviceID;
 } i2o_pci_bus;
 
 typedef struct _i2o_local_bus {
-	u16 LbBaseIOPort;
-	u16 reserved;
-	u32 LbBaseMemoryAddress;
+	__u16 LbBaseIOPort;
+	__u16 reserved;
+	__u32 LbBaseMemoryAddress;
 } i2o_local_bus;
 
 typedef struct _i2o_isa_bus {
-	u16 IsaBaseIOPort;
-	u8 CSN;
-	u8 reserved;
-	u32 IsaBaseMemoryAddress;
+	__u16 IsaBaseIOPort;
+	__u8 CSN;
+	__u8 reserved;
+	__u32 IsaBaseMemoryAddress;
 } i2o_isa_bus;
 
 typedef struct _i2o_eisa_bus_info {
-	u16 EisaBaseIOPort;
-	u8 reserved;
-	u8 EisaSlotNumber;
-	u32 EisaBaseMemoryAddress;
+	__u16 EisaBaseIOPort;
+	__u8 reserved;
+	__u8 EisaSlotNumber;
+	__u32 EisaBaseMemoryAddress;
 } i2o_eisa_bus;
 
 typedef struct _i2o_mca_bus {
-	u16 McaBaseIOPort;
-	u8 reserved;
-	u8 McaSlotNumber;
-	u32 McaBaseMemoryAddress;
+	__u16 McaBaseIOPort;
+	__u8 reserved;
+	__u8 McaSlotNumber;
+	__u32 McaBaseMemoryAddress;
 } i2o_mca_bus;
 
 typedef struct _i2o_other_bus {
-	u16 BaseIOPort;
-	u16 reserved;
-	u32 BaseMemoryAddress;
+	__u16 BaseIOPort;
+	__u16 reserved;
+	__u32 BaseMemoryAddress;
 } i2o_other_bus;
 
 typedef struct _i2o_hrt_entry {
-	u32 adapter_id;
-	u32 parent_tid:12;
-	u32 state:4;
-	u32 bus_num:8;
-	u32 bus_type:8;
+	__u32 adapter_id;
+	__u32 parent_tid:12;
+	__u32 state:4;
+	__u32 bus_num:8;
+	__u32 bus_type:8;
 	union {
 		i2o_pci_bus pci_bus;
 		i2o_local_bus local_bus;
@@ -194,66 +190,66 @@ typedef struct _i2o_hrt_entry {
 } i2o_hrt_entry;
 
 typedef struct _i2o_hrt {
-	u16 num_entries;
-	u8 entry_len;
-	u8 hrt_version;
-	u32 change_ind;
+	__u16 num_entries;
+	__u8 entry_len;
+	__u8 hrt_version;
+	__u32 change_ind;
 	i2o_hrt_entry hrt_entry[1];
 } i2o_hrt;
 
 typedef struct _i2o_lct_entry {
-	u32 entry_size:16;
-	u32 tid:12;
-	u32 reserved:4;
-	u32 change_ind;
-	u32 device_flags;
-	u32 class_id:12;
-	u32 version:4;
-	u32 vendor_id:16;
-	u32 sub_class;
-	u32 user_tid:12;
-	u32 parent_tid:12;
-	u32 bios_info:8;
-	u8 identity_tag[8];
-	u32 event_capabilities;
+	__u32 entry_size:16;
+	__u32 tid:12;
+	__u32 reserved:4;
+	__u32 change_ind;
+	__u32 device_flags;
+	__u32 class_id:12;
+	__u32 version:4;
+	__u32 vendor_id:16;
+	__u32 sub_class;
+	__u32 user_tid:12;
+	__u32 parent_tid:12;
+	__u32 bios_info:8;
+	__u8 identity_tag[8];
+	__u32 event_capabilities;
 } i2o_lct_entry;
 
 typedef struct _i2o_lct {
-	u32 table_size:16;
-	u32 boot_tid:12;
-	u32 lct_ver:4;
-	u32 iop_flags;
-	u32 change_ind;
+	__u32 table_size:16;
+	__u32 boot_tid:12;
+	__u32 lct_ver:4;
+	__u32 iop_flags;
+	__u32 change_ind;
 	i2o_lct_entry lct_entry[1];
 } i2o_lct;
 
 typedef struct _i2o_status_block {
-	u16 org_id;
-	u16 reserved;
-	u16 iop_id:12;
-	u16 reserved1:4;
-	u16 host_unit_id;
-	u16 segment_number:12;
-	u16 i2o_version:4;
-	u8 iop_state;
-	u8 msg_type;
-	u16 inbound_frame_size;
-	u8 init_code;
-	u8 reserved2;
-	u32 max_inbound_frames;
-	u32 cur_inbound_frames;
-	u32 max_outbound_frames;
+	__u16 org_id;
+	__u16 reserved;
+	__u16 iop_id:12;
+	__u16 reserved1:4;
+	__u16 host_unit_id;
+	__u16 segment_number:12;
+	__u16 i2o_version:4;
+	__u8 iop_state;
+	__u8 msg_type;
+	__u16 inbound_frame_size;
+	__u8 init_code;
+	__u8 reserved2;
+	__u32 max_inbound_frames;
+	__u32 cur_inbound_frames;
+	__u32 max_outbound_frames;
 	char product_id[24];
-	u32 expected_lct_size;
-	u32 iop_capabilities;
-	u32 desired_mem_size;
-	u32 current_mem_size;
-	u32 current_mem_base;
-	u32 desired_io_size;
-	u32 current_io_size;
-	u32 current_io_base;
-	u32 reserved3:24;
-	u32 cmd_status:8;
+	__u32 expected_lct_size;
+	__u32 iop_capabilities;
+	__u32 desired_mem_size;
+	__u32 current_mem_size;
+	__u32 current_mem_base;
+	__u32 desired_io_size;
+	__u32 current_io_size;
+	__u32 current_io_base;
+	__u32 reserved3:24;
+	__u32 cmd_status:8;
 } i2o_status_block;
 
 /* Event indicator mask flags */
@@ -334,7 +330,7 @@ typedef struct _i2o_status_block {
 #define I2O_CLASS_ATE_PERIPHERAL		0x061
 #define I2O_CLASS_FLOPPY_CONTROLLER		0x070
 #define I2O_CLASS_FLOPPY_DEVICE 		0x071
-#define I2O_CLASS_BUS_ADAPTER_PORT		0x080
+#define I2O_CLASS_BUS_ADAPTER			0x080
 #define I2O_CLASS_PEER_TRANSPORT_AGENT		0x090
 #define I2O_CLASS_PEER_TRANSPORT		0x091
 #define	I2O_CLASS_END				0xfff
@@ -400,4 +396,26 @@ typedef struct _i2o_status_block {
 #define ADAPTER_STATE_FAILED			0x10
 #define ADAPTER_STATE_FAULTED			0x11
 
+/*
+ *	Software module types
+ */
+#define I2O_SOFTWARE_MODULE_IRTOS		0x11
+#define I2O_SOFTWARE_MODULE_IOP_PRIVATE		0x22
+#define I2O_SOFTWARE_MODULE_IOP_CONFIG		0x23
+
+/*
+ *	Vendors
+ */
+#define I2O_VENDOR_DPT				0x001b
+
+/*
+ * DPT / Adaptec specific values for i2o_sg_io_hdr flags.
+ */
+#define I2O_DPT_SG_FLAG_INTERPRET		0x00010000
+#define I2O_DPT_SG_FLAG_PHYSICAL		0x00020000
+
+#define I2O_DPT_FLASH_FRAG_SIZE			0x10000
+#define I2O_DPT_FLASH_READ			0x0101
+#define I2O_DPT_FLASH_WRITE			0x0102
+
 #endif				/* _I2O_DEV_H */
--- raidutils-0.0.6.orig/include/messages.h
+++ raidutils-0.0.6/include/messages.h
@@ -1656,7 +1656,7 @@
 #define   MSG_DOWNLOAD_FW          0x0076L
 //
 // Description:
-//   Downloads FW code to an HBA's non-removeable DASD devices.
+//   Downloads FW code to an HBA's non-removable DASD devices.
 //
 // Target Types:    0
 // Input Data:      Download cmd (uLONG)
--- raidutils-0.0.6.orig/include/mgr.hh
+++ raidutils-0.0.6/include/mgr.hh
@@ -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)
 
--- raidutils-0.0.6.orig/include/rtncodes.h
+++ raidutils-0.0.6/include/rtncodes.h
@@ -496,7 +496,7 @@
 //              Errors downloading firmware
 //---------------------------------------------------------------------------
 
-  // There are no non-removeable DASD devices to store the FW code.
+  // There are no non-removable DASD devices to store the FW code.
 #define ERR_FWD_NO_SPACE        (0x01f0L | MSG_RTN_FAILED)
 
   // There are only DASD devices without sufficient space reserved
@@ -517,8 +517,8 @@
 //              Errors reserving disk space
 //---------------------------------------------------------------------------
 
-  // Cannot reserve disk space on a removeable media device
-#define ERR_RSV_REMOVEABLE      (0x0200L | MSG_RTN_FAILED)
+  // Cannot reserve disk space on a removable media device
+#define ERR_RSV_REMOVABLE       (0x0200L | MSG_RTN_FAILED)
   // Cannot reserve disk space on a non-DASD device
 #define ERR_RSV_NOT_DASD        (0x0201L | MSG_RTN_FAILED)
   // The # of blocks reserved must be greater than zero
--- raidutils-0.0.6.orig/lib/Makefile.am
+++ raidutils-0.0.6/lib/Makefile.am
@@ -1,3 +1,3 @@
 lib_LTLIBRARIES=libraidutil.la
 libraidutil_la_SOURCES=ctlr_map.cpp dpt_buff.cpp engcalls.cpp engmsg.c findpath.c funcs.c hba_log.cpp lockunix.c scsi_log.cpp dptalign.c
-libraidutil_la_CPPFLAGS=-O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -DNEW_LOGGER -DI_WANT_SNI_DEBUG -D__UNIX__ -I../include
+libraidutil_la_CPPFLAGS=-O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -DNEW_LOGGER -DI_WANT_SNI_DEBUG -D__UNIX__ -I$(top_srcdir)/include
--- raidutils-0.0.6.orig/lib/ctlr_map.cpp
+++ raidutils-0.0.6/lib/ctlr_map.cpp
@@ -38,9 +38,12 @@
 * Description:          Discover device naming in the OS environment.
 * Version Control:
 *
-* $Revision: 37 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:19:51  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/lib/engcalls.cpp
+++ raidutils-0.0.6/lib/engcalls.cpp
@@ -292,8 +292,8 @@ DPT_RTN_T DPT_CallAnEngine(long Destinat
        {
          if(AllocBuffers(ToSize,FromSize) == NULL)
            {
-             printf("\nShared Memory Allocation Failed, To Size = %x, From Size = %x, Errno = %x",
-                     ToSize, FromSize,  errno);
+             printf("\nShared Memory Allocation Failed, To Size = %lx, From Size = %lx, Errno = %x",
+                     (unsigned long)ToSize, (unsigned long)FromSize,  errno);
 #ifdef _DPT_LOGGER    
              //
              // If this is the logger, release the semaphore
@@ -333,7 +333,7 @@ DPT_RTN_T DPT_CallAnEngine(long Destinat
     //
     // Send off the message to the engine
     //
-    if(i = msgsnd(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,0) != -1)
+    if((i = (msgsnd(MsgID,(struct msgbuf *)&HdrBuff,MsgDataSize,0) != -1)))
      {
        //
        // Set up the alarm if we are timming
@@ -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;
@@ -1196,7 +1196,7 @@ void I2oPrintMem(char* Addr,long Count)
 
   // Print Out The Address In HEX
 
-     printf("\n%.4x  ",Offset);
+     printf("\n%.4lx  ",(unsigned long)Offset);
 
   // Now Print Out 16 Bytes In HEX Format
 
--- raidutils-0.0.6.orig/lib/engmsg.c
+++ raidutils-0.0.6/lib/engmsg.c
@@ -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
--- raidutils-0.0.6.orig/lib/lockunix.c
+++ raidutils-0.0.6/lib/lockunix.c
@@ -82,7 +82,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, 0644)) < 0) {
 		free (templateBuffer);
 		free (lock);
 		return (-1);
@@ -152,7 +152,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, 0644)) >= 0) {
 			sprintf (buffer, "%d\n", pid);
 			write (fd, buffer, strlen(buffer));
 			close (fd);
--- raidutils-0.0.6.orig/raideng/Makefile.am
+++ raidutils-0.0.6/raideng/Makefile.am
@@ -1,4 +1,4 @@
-bin_PROGRAMS=raideng
+sbin_PROGRAMS=raideng
 raideng_SOURCES=addr_rng.cpp array.cpp connect.cpp core.cpp core_ccb.cpp core_con.cpp core_dev.cpp core_mgr.cpp core_obj.cpp debug.cpp device.cpp dptcbuff.c driver.cpp eata2i2o.c eng_sig.c eng_std.cpp eng_unix.cpp engine.cpp englists.cpp gbl_fns.cpp hba.cpp manager.cpp msg_str.cpp object.cpp osd_unix.cpp ptrarray.cpp raid.cpp raid_bcd.cpp raid_dev.cpp raid_hba.cpp raid_mgr.cpp raiddrvr.cpp scsi_bcd.cpp scsi_ccb.cpp scsi_con.cpp scsi_dev.cpp scsi_hba.cpp scsi_mgr.cpp scsi_obj.cpp scsidrvr.cpp semaphor.c stat_log.cpp swap_em.c threads.cpp unreslvd.cpp
-raideng_CPPFLAGS=-D__UNIX__ -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -DI_WANT_SNI_DEBUG -DNEW_LOGGER -I../include
+raideng_CPPFLAGS=-D__UNIX__ -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -DI_WANT_SNI_DEBUG -DNEW_LOGGER -I$(top_srcdir)/include
 raideng_LDADD=../lib/libraidutil.la
--- raidutils-0.0.6.orig/raideng/connect.cpp
+++ raidutils-0.0.6/raideng/connect.cpp
@@ -176,7 +176,7 @@ return (ccb_P);
 //Description:
 //
 //    This function attempts to reserve space at the end of all non-
-//removeable DASD devices.  This space is used by DPT to store
+//removable DASD devices.  This space is used by DPT to store
 //configuration information, downloaded FW code...
 //
 //Parameters:
@@ -203,9 +203,9 @@ dptObject_C *obj_P = (dptObject_C *) obj
 while (obj_P!=NULL) {
 	if (obj_P->isDevice()) {
 		dev_P = (dptDevice_C *) obj_P;
-		// If a non-removeable HBA physical DASD device...
+		// If a non-removable HBA physical DASD device...
 		if ((dev_P->getLevel()==2) && (dev_P->getObjType()==DPT_SCSI_DASD) &&
-		!dev_P->isComponent() && !dev_P->isRemoveable()) {
+		!dev_P->isComponent() && !dev_P->isRemovable()) {
 
 			// Determine how much space is currently reserved
 			spaceReserved = dev_P->getMaxPhyLBA() - dev_P->getLastLBA();
--- raidutils-0.0.6.orig/raideng/connect.hpp
+++ raidutils-0.0.6/raideng/connect.hpp
@@ -189,7 +189,7 @@ public:
 
 // Constructor/Destructor.............................
 
-			dptSCSIcon_C::dptSCSIcon_C();
+			dptSCSIcon_C();
 
 // Message Handlers...................................
 
@@ -302,7 +302,7 @@ public:
    uLONG		genMagicNum();
      // Get a CCB to perform I/O
    engCCB_C *		acquireCCB();
-     // Reserve space at the end of all non-removeable DASD devices
+     // Reserve space at the end of all non-removable DASD devices
    void			reserveEndOfDisks();
      // Destroy block zero of all devices marked for partition table
      // zapping
--- raidutils-0.0.6.orig/raideng/device.cpp
+++ raidutils-0.0.6/raideng/device.cpp
@@ -1415,8 +1415,8 @@ DPT_RTN_T       dptDevice_C::readReserve
 
    DPT_RTN_T    retVal = MSG_RTN_IGNORED;
 
-  // If this is a non-removeable FW physical DASD device...
-if ((getObjType()==DPT_SCSI_DASD) && (getLevel()==2) && !isRemoveable() &&
+  // If this is a non-removable FW physical DASD device...
+if ((getObjType()==DPT_SCSI_DASD) && (getLevel()==2) && !isRemovable() &&
     (capacity.maxPhysLBA>0)) {
      // Initialize the CCB to perform a read operation
    ccb_P->read(capacity.maxPhysLBA,1,512,ptrToLong(ccb_P->dataBuff_P));
@@ -2462,8 +2462,8 @@ if ((status.display==DSPLY_STAT_OPTIMAL)
 if (isPhysical()) {
      // Perform a test unit ready cmd
    checkIfReady();
-     // If removeable media or no capacity info
-   if (isReady() && (isRemoveable() || (capacity.maxLBA == 0))) {
+     // If removable media or no capacity info
+   if (isReady() && (isRemovable() || (capacity.maxLBA == 0))) {
 	// Try to get the media capacity
       getCapacity();
 	// If valid capacity info...
@@ -2472,8 +2472,8 @@ if (isPhysical()) {
 	 initReserveBlockInfo();
    }
 
-	// if the device is not ready and it is not formatting (and not removeable)
-	if (!isReady() && !(status.main == PMAIN_STAT_FORMAT) && !isRemoveable()) {
+	// if the device is not ready and it is not formatting (and not removable)
+	if (!isReady() && !(status.main == PMAIN_STAT_FORMAT) && !isRemovable()) {
 	    status.display = DSPLY_STAT_MISSING;
 	    DEBUG(1, "Device " << PRT_ADDR << "set to missing" );
 	}
@@ -4338,7 +4338,7 @@ return (retVal);
 //
 //Description:
 //
-//    This function reserves space at the end of a non-removeable DASD
+//    This function reserves space at the end of a non-removable DASD
 //device for use by DPT.  This space is currently used for a reserve block,
 //a RAID table, and downloaded FW code.
 //
@@ -4375,7 +4375,7 @@ return(retVal);
 //
 //Description:
 //
-//    This function reserves space at the end of a non-removeable DASD
+//    This function reserves space at the end of a non-removable DASD
 //device for use by DPT.  This space is currently used for a reserve block,
 //a RAID table, and downloaded FW code.
 //
@@ -4402,8 +4402,8 @@ DPT_RTN_T       dptDevice_C::reserveEndO
 
    DPT_RTN_T    retVal;
 
-	if (isRemoveable())
-		retVal = MSG_RTN_FAILED | ERR_RSV_REMOVEABLE;
+	if (isRemovable())
+		retVal = MSG_RTN_FAILED | ERR_RSV_REMOVABLE;
 	else if (getObjType()!=DPT_SCSI_DASD)
 		retVal = MSG_RTN_FAILED | ERR_RSV_NOT_DASD;
 	else if (numBlocks==0)
--- raidutils-0.0.6.orig/raideng/device.hpp
+++ raidutils-0.0.6/raideng/device.hpp
@@ -144,8 +144,8 @@ const uSHORT	FLG_ENG_EMULATED	= 0x0001;
   // 1=The device is emulated drive 1 (D:)
   // 0=The device is emulated drive 0 (C:)
 const uSHORT	FLG_ENG_EMU_01		= 0x0002;
-  // 1=The device has removeable media
-const uSHORT	FLG_ENG_REMOVEABLE	= 0x0004;
+  // 1=The device has removable media
+const uSHORT	FLG_ENG_REMOVABLE	= 0x0004;
   // 1=The DPT name has not been saved to hardware
 const uSHORT	FLG_ENG_NEW_NAME	= 0x0008;
   // 1=A valid partition table was found on this device
@@ -222,9 +222,9 @@ protected:
      // Return object information in the specified output buffer
    virtual DPT_RTN_T	rtnInfo(dptBuffer_S *);
 
-     // Set removeable media flag
-   virtual void		setRemoveable() {
-			   scsiFlags |= FLG_ENG_REMOVEABLE;
+     // Set removable media flag
+   virtual void		setRemovable() {
+			   scsiFlags |= FLG_ENG_REMOVABLE;
 			}
 
      // Set SAF-TE flag
@@ -282,9 +282,9 @@ public:
 
 // Boolean Functions..................................
 
-     // Determines if the device has removeable media
-   uSHORT		isRemoveable() {
-			   return (scsiFlags & FLG_ENG_REMOVEABLE);
+     // Determines if the device has removable media
+   uSHORT		isRemovable() {
+			   return (scsiFlags & FLG_ENG_REMOVABLE);
 			}
      // Determines if the device is an emulated drive
    uSHORT		isEmulated() {
--- raidutils-0.0.6.orig/raideng/driver.cpp
+++ raidutils-0.0.6/raideng/driver.cpp
@@ -465,7 +465,7 @@ DPT_RTN_T dptDriver_C::scanSystem(uSHORT
 
 		// Check for valid partition tables
 		findLSUpartitions();
-		// Attempt to reserve space at the end of every non-removeable
+		// Attempt to reserve space at the end of every non-removable
 		// disk for use by DPT
 		myConn_P()->reserveEndOfDisks();
 
--- raidutils-0.0.6.orig/raideng/eng_unix.cpp
+++ raidutils-0.0.6/raideng/eng_unix.cpp
@@ -188,7 +188,7 @@ extern dpt_sig_S engineSig;
 
 /***************************** Main Entry Point *****************************/
 
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
   {
     int Rtnval;
     int Done;
@@ -265,7 +265,7 @@ main(int argc, char *argv[])
 		else if (i == ERR_CONN_LIST_ALLOC)
 			printf("Alloc Connection List ");
 		else
-			printf(" With Unknown Error %x", i);
+			printf(" With Unknown Error %lx", (unsigned long)i);
 		printf("Failed\n");
 	}
 
@@ -410,7 +410,7 @@ main(int argc, char *argv[])
         // At the top of the loop, we will pull off and process all turnaround messages on the queue since
         // they don't have to be sent down to the engine
         //
-        while(Rtnval = msgrcv(MsqID,(struct msgbuf *)&HdrBuff, MsgDataSize, DPT_TurnAroundKey,IPC_NOWAIT) != -1)
+        while((Rtnval = (msgrcv(MsqID,(struct msgbuf *)&HdrBuff, MsgDataSize, DPT_TurnAroundKey,IPC_NOWAIT) != -1)))
          {
            Done = ProcessTurnAroundMessage(&HdrBuff);
          }
@@ -447,8 +447,8 @@ main(int argc, char *argv[])
          // Done is not set, so wait for a message to come in
          //
          else {
-                while(Rtnval = msgrcv(MsqID,(struct msgbuf *)&HdrBuff,
-                                      MsgDataSize, -DPT_EngineKey,0) == -1)
+                while((Rtnval = (msgrcv(MsqID,(struct msgbuf *)&HdrBuff,
+                                      MsgDataSize, -DPT_EngineKey,0) == -1)))
                  {
 
   /* If The Message Failed, And The Reason Was Not An Interrupt, Exit */
@@ -470,7 +470,7 @@ main(int argc, char *argv[])
              {
               if(Verbose)
                {
-                 printf("\n               : Message received for PID %d : no process found, discarding",
+                 printf("\n               : Message received for PID %ld : no process found, discarding",
                          HdrBuff.callerID);
                }
                continue;
@@ -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;
 
@@ -501,11 +501,13 @@ main(int argc, char *argv[])
                      FormatTimeString(TimeString,time(0));
                      printf("\nEngine Calls   : %s DPT_CallEngine",TimeString);
                      printf( 
-                   "\n                 EngTag = %x, Event = %x, Target = %x",
-                       HdrBuff.engineTag,HdrBuff.engEvent,HdrBuff.targetTag);
+                   "\n                 EngTag = %lx, Event = %lx, Target = %lx",
+                       (unsigned long)HdrBuff.engineTag,
+                       (unsigned long)HdrBuff.engEvent,
+                       (unsigned long)HdrBuff.targetTag);
                      printf( 
-                   "\n                 Offset = %x fromEng_P = %x toEng_P = %x",
-		       HdrBuff.FromEngBuffOffset, fromEng_P, toEng_P);
+                   "\n                 Offset = %lx fromEng_P = %lx toEng_P = %lx",
+		       HdrBuff.FromEngBuffOffset, (unsigned long)fromEng_P, (unsigned long)toEng_P);
 /*#else
                       "\n                 EngTag = %x, Event = %x, Target = %x",
                        HdrBuff.engineTag,HdrBuff.engEvent,HdrBuff.targetTag);
@@ -534,7 +536,7 @@ main(int argc, char *argv[])
                   {
                    if(Verbose)
                     {
-                      printf("\n               : Returning message for PID %d : no process found, discarding",
+                      printf("\n               : Returning message for PID %ld : no process found, discarding",
                              HdrBuff.callerID);
                     }
                    continue;
@@ -687,7 +689,7 @@ int ProcessTurnAroundMessage(MsgHdr *Hdr
    else {
        if(Verbose)
          {
-           printf("\n               : Returning message for PID %d : no process found, discarding",
+           printf("\n               : Returning message for PID %ld : no process found, discarding",
                   HdrBuff_P->callerID);
          }
   }
--- raidutils-0.0.6.orig/raideng/gbl_fns.cpp
+++ raidutils-0.0.6/raideng/gbl_fns.cpp
@@ -504,7 +504,7 @@ while ((b_P[i]>=32) && (b_P[i]<=126)) {
 //
 //Description:
 //
-//    This function searches the specified list for a non-removeable
+//    This function searches the specified list for a non-removable
 //DASD device.
 //
 //Parameters:
@@ -528,9 +528,9 @@ dptObject_C *obj_P = (dptObject_C *) lis
 while ((obj_P!=NULL) && !found) {
    if (obj_P->isManager())
       found = findDASD(((dptManager_C *)obj_P)->logList);
-     // If a non-removeable DASD device is present...
+     // If a non-removable DASD device is present...
    else if ((((dptDevice_C *)obj_P)->getObjType()==DPT_SCSI_DASD) &&
-	    !((dptDevice_C *)obj_P)->isRemoveable() )
+	    !((dptDevice_C *)obj_P)->isRemovable() )
       found = 1;
    obj_P = (dptObject_C *) list.next();
 } // end while (obj_P!=NULL)
--- raidutils-0.0.6.orig/raideng/hba.cpp
+++ raidutils-0.0.6/raideng/hba.cpp
@@ -4020,7 +4020,7 @@ dptDevice_C *dev_P = (dptDevice_C *) log
 while (dev_P) {
 	// If an unarrayed physical DASD device with no magic number...
    if ((dev_P->getLevel()==2) && (dev_P->getObjType()==DPT_SCSI_DASD) &&
-	  !dev_P->isComponent() && !dev_P->isRemoveable() &&
+	  !dev_P->isComponent() && !dev_P->isRemovable() &&
 	  !dev_P->getMagicNum()) {
 
 	// Attempt to set the physical device's magic number
--- raidutils-0.0.6.orig/raideng/i2oadptr.h
+++ raidutils-0.0.6/raideng/i2oadptr.h
@@ -1,4 +1,4 @@
-/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2oadptr.h 10    4/30/01 12:57p Salyzyn $ */
+/* $Header$ */
 /****************************************************************
  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  * Copyright (c) 2000 Adaptec Corproation.
--- raidutils-0.0.6.orig/raideng/i2obscsi.h
+++ raidutils-0.0.6/raideng/i2obscsi.h
@@ -1,4 +1,4 @@
-/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2obscsi.h 14    4/30/01 12:57p Salyzyn $ */
+/* $Header$ */
 /****************************************************************
  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  * Copyright (c) 2000 Adaptec Corporation.
--- raidutils-0.0.6.orig/raideng/i2odep.h
+++ raidutils-0.0.6/raideng/i2odep.h
@@ -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)
--- raidutils-0.0.6.orig/raideng/i2oexec.h
+++ raidutils-0.0.6/raideng/i2oexec.h
@@ -1,4 +1,4 @@
-/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2oexec.h 17    4/30/01 12:57p Salyzyn $ */
+/* $Header$ */
 /****************************************************************
  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  * Copyright (c) 2000 Adaptec Corporation.
--- raidutils-0.0.6.orig/raideng/i2omsg.h
+++ raidutils-0.0.6/raideng/i2omsg.h
@@ -1,4 +1,4 @@
-/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2omsg.h 30    4/30/01 12:57p Salyzyn $ */
+/* $Header$ */
 /****************************************************************
  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  * Copyright (c) 2000 Adaptec Corporation.
--- raidutils-0.0.6.orig/raideng/i2omstor.h
+++ raidutils-0.0.6/raideng/i2omstor.h
@@ -243,7 +243,7 @@ PRAGMA_PACK_PUSH
 #define I2O_BSA_DEV_CAP_MULTI_PATH          0x00000002
 #define I2O_BSA_DEV_CAP_DYNAMIC_CAPACITY    0x00000004
 #define I2O_BSA_DEV_CAP_REMOVABLE_MEDIA     0x00000008
-#define I2O_BSA_DEV_CAP_REMOVEABLE_DEVICE   0x00000010
+#define I2O_BSA_DEV_CAP_REMOVABLE_DEVICE   0x00000010
 #define I2O_BSA_DEV_CAP_READ_ONLY           0x00000020
 #define I2O_BSA_DEV_CAP_LOCKOUT             0x00000040
 #define I2O_BSA_DEV_CAP_BOOT_BYPASS         0x00000080
@@ -754,13 +754,13 @@ typedef U16     I2O_BSA_VERIFY_FLAGS;
 #define I2O_BSA_ERROR_CORRECTION        0x0040
 
 
-/* I2O BSA Removeable Media Identifier values */
+/* I2O BSA Removable Media Identifier values */
 
 typedef U32     I2O_BSA_MEDIA_ID;
 #define I2O_BSA_MEDIA_ID_CURRENT_MOUNTED    0xFFFFFFFF
 
 
-/* I2O BSA Removeable Media Load Flags */
+/* I2O BSA Removable Media Load Flags */
 
 typedef U8      I2O_BSA_LOAD_FLAGS;
 #define I2O_BSA_LOAD_FLAG_MEDIA_LOCK    0x80
@@ -869,7 +869,7 @@ typedef struct _I2O_BSA_DEVICE_RESET_MES
 
 /****************************************************************************/
 
-/* I2O BSA Media Eject for Removeable Media Message Frame */
+/* I2O BSA Media Eject for Removable Media Message Frame */
 
 typedef struct _I2O_BSA_MEDIA_EJECT_MESSAGE {
     I2O_MESSAGE_FRAME       StdMessageFrame;
@@ -891,7 +891,7 @@ typedef struct _I2O_BSA_MEDIA_LOCK_MESSA
 
 /****************************************************************************/
 
-/* I2O BSA Media Mount for Removeable Media Message Frame */
+/* I2O BSA Media Mount for Removable Media Message Frame */
 
 typedef struct _I2O_BSA_MEDIA_MOUNT_MESSAGE {
     I2O_MESSAGE_FRAME       StdMessageFrame;
--- raidutils-0.0.6.orig/raideng/i2otypes.h
+++ raidutils-0.0.6/raideng/i2otypes.h
@@ -1,4 +1,4 @@
-/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2otypes.h 13    4/30/01 12:57p Salyzyn $ */
+/* $Header$ */
 /****************************************************************
  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  * Copyright (c) 2000 Adaptec Corporation.
--- raidutils-0.0.6.orig/raideng/i2outil.h
+++ raidutils-0.0.6/raideng/i2outil.h
@@ -1,4 +1,4 @@
-/* $Header: /SW/DRIVERS/FreeBSD/I2O.4.X/i2outil.h 12    4/30/01 12:57p Salyzyn $ */
+/* $Header$ */
 /****************************************************************
  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  * Copyright (c) 2000 Adaptec Corporation.
--- raidutils-0.0.6.orig/raideng/object.cpp
+++ raidutils-0.0.6/raideng/object.cpp
@@ -121,9 +121,9 @@ memcpy(descr.productID,inq_P->getProduct
 memcpy(descr.revision,inq_P->getRevision(),4);
 memcpy(descr.vendorExtra,inq_P->getVendorExtra(),20);
 descr.terminate();
-  // Check for removeable media
+  // Check for removable media
 if (inq_P->getDevType() & DEVTYPE_RMB)
-   setRemoveable();
+   setRemovable();
 
 // look for SAF-TE in the vendor extra field or the product ID
 if (memcmp(inq_P->getVendorExtra()+8, "SAF-TE", 6) == 0)
--- raidutils-0.0.6.orig/raideng/object.hpp
+++ raidutils-0.0.6/raideng/object.hpp
@@ -249,8 +249,8 @@ protected:
 
      // Return object information in the specified output buffer
    virtual DPT_RTN_T	rtnInfo(dptBuffer_S *);
-     // Set removeable media flag
-   virtual void		setRemoveable() {}
+     // Set removable media flag
+   virtual void		setRemovable() {}
 
      // Set SAFTE flag
    virtual void		setSAFTE() {};
--- raidutils-0.0.6.orig/raideng/osd_unix.cpp
+++ raidutils-0.0.6/raideng/osd_unix.cpp
@@ -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,35 +378,53 @@ DPT_RTN_T osdIOrequest(uSHORT ioMethod)
 
    if(ioMethod==DPT_IO_PASS_THRU)
      {
-
-  /* Try To Open The First Adapter Device */
-
-       for(Index = 0; Index < 20; ++Index)
+       // make sure the device entry represents an active device and 
+       // not just a device file that was probed unsuccessfully (so we 
+       // don't wait 20 seconds trying to connect to it in the "for" 
+       // loop... and so we don't generate a "could not be opened"
+       // error message mentioning the name of this probed-but-not-found
+       // device file, given that we wouldn't expect to be able to 
+       // open it anyway).
+       if(DefaultHbaDev->Flags == 0 )
         {
-          FileID = open(DefaultHbaDev->NodeName,O_RDONLY);
-          if((FileID == -1)&&(errno == ENOENT))
-           {
-             sleep(1);
-           }
-           else {
-                  break;
-           }
+          // this entry was NOT initialized, so print an error message
+          // (and bypass any attempts to open the file; we simply return
+          // MSG_RTN_FAILED to the caller)
+          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 */
+
+               for(Index = 0; Index < 20; ++Index)
+                {
+                  FileID = open(DefaultHbaDev->NodeName,O_RDONLY);
+                  if((FileID == -1)&&(errno == ENOENT))
+                   {
+                     sleep(1);
+                   }
+                   else {
+                          break;
+                   }
+                }
 
 #ifdef _SINIX_ADDON
-       if (DemoMode)
-           FileID = 99;
+               if (DemoMode)
+                   FileID = 99;
 #endif
-       if(FileID != -1)
-         {
-           retVal = MSG_RTN_COMPLETED;
-           close(FileID);
-         }
-       else printf("\nosdIOrequest : File %s Could Not Be Opened",
-                     DefaultHbaDev->NodeName);
+               if(FileID != -1)
+                 {
+                   retVal = MSG_RTN_COMPLETED;
+                   close(FileID);
+                 }
+               else printf("\nosdIOrequest : File %s Could Not Be Opened",
+                             DefaultHbaDev->NodeName);
+        }
      }
    if(Verbose)
-        printf("\nosdIOrequest   : Return = %x",retVal);
+        printf("\nosdIOrequest   : Return = %lx",(unsigned long)retVal);
    return(retVal);
  }
 /* osdIOrequest() - end  */
@@ -501,12 +523,21 @@ 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));
 
-        printf("\nosdOpenEngine  : %s Return = %x - %d hbas found",
-               TimeString,retVal,NumHBAs);
+        printf("\nosdOpenEngine  : %s Return = %lx - %d hbas found",
+               TimeString,(unsigned long)retVal,NumHBAs);
 
         fflush(stdout);
      }
@@ -551,7 +582,7 @@ DPT_RTN_T osdCloseEngine(void)
    if(Verbose)
      {
         FormatTimeString(TimeString,time(0));
-        printf("\nosdCloseEngine : %s Return = %x",TimeString,retVal);
+        printf("\nosdCloseEngine : %s Return = %lx",TimeString,(unsigned long)retVal);
         fflush(stdout);
      }
    return (retVal);
@@ -723,7 +754,7 @@ DPT_RTN_T osdGetDrvrSig(uSHORT ioMethod,
   if(Verbose)
     {
       FormatTimeString(TimeString,time(0));
-      printf("\nosdGetDrvrSig  : %s Return = %x",TimeString,retVal);
+      printf("\nosdGetDrvrSig  : %s Return = %lx",TimeString,(unsigned long)retVal);
       fflush(stdout);
     }
 
@@ -819,7 +850,7 @@ DPT_RTN_T osdSendCCB(uSHORT ioMethod,dpt
                           ccb_P->eataCP.nestedFW & 0x0ff,
                           ccb_P->eataCP.physical & 0x0ff);
            printf(
-  "\n                 ScsiAddr = (%.1x,%.1x,%.1x,%.1x), ReqLen = %.2X, DataLen = %.2X",
+  "\n                 ScsiAddr = (%.1x,%.1x,%.1x,%.1x), ReqLen = %.2X, DataLen = %.2lX",
                           ccb_P->ctlrNum,
                           (ccb_P->eataCP.devAddr >> 5) & 0x0ff,
                           ccb_P->eataCP.devAddr & 0x01f,
@@ -946,7 +977,7 @@ DPT_RTN_T osdSendCCB(uSHORT ioMethod,dpt
    if(Verbose)
     {
       FormatTimeString(TimeString,time(0));
-      printf("\nosdSendCCB     : %s Return = %x",TimeString,retVal);
+      printf("\nosdSendCCB     : %s Return = %lx",TimeString,(unsigned long)retVal);
       fflush(stdout);
     }
    return (retVal);
@@ -1019,8 +1050,8 @@ DPT_RTN_T osdSendMessage(uLONG HbaNum, P
       {
         if(!HbaDevs[HbaNum].IoAddress)
          {
-           printf("\nosdSendMessage : IoAddress is zero for HbaNum=%d\n",
-                   HbaNum);
+           printf("\nosdSendMessage : IoAddress is zero for HbaNum=%ld\n",
+                   (unsigned long)HbaNum);
          }
       }
 
@@ -1232,7 +1263,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;
@@ -1312,7 +1343,7 @@ DPT_RTN_T osdSendMessage(uLONG HbaNum, P
   if(Verbose)
    {
      FormatTimeString(TimeString,time(0));
-     printf("\nosdSendMessage : %s Return = %x",TimeString,retVal);
+     printf("\nosdSendMessage : %s Return = %lx",TimeString,(unsigned long)retVal);
    }
   return(retVal);
 
@@ -1914,7 +1945,7 @@ int _osdStartI2OCp(Controller_t controll
   if(Verbose)
    {
      FormatTimeString(TimeString,time(0));
-     printf("\n_osdStartCp    : %s Enter, callback = %x",TimeString,callback);
+     printf("\n_osdStartCp    : %s Enter, callback = %lx",TimeString,(unsigned long)callback);
    }
 
   //
@@ -2028,7 +2059,7 @@ DPT_RTN_T osdGetCtlrs(uSHORT ioMethod,uS
    if(Verbose)
      {
         FormatTimeString(TimeString,time(0));
-        printf("\nosdGetCtlrs    : %s Enter ",TimeString,retVal);
+        printf("\nosdGetCtlrs    : %s Enter, Return = %ld ",TimeString,(unsigned long)retVal);
         fflush(stdout);
      }
 
@@ -2144,7 +2175,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 {
 		   /*
@@ -2289,7 +2320,7 @@ DPT_RTN_T osdGetCtlrs(uSHORT ioMethod,uS
    if(Verbose)
      {
         FormatTimeString(TimeString,time(0));
-        printf("\nosdGetCtlrs    : %s Return = %x",TimeString,retVal);
+        printf("\nosdGetCtlrs    : %s Return = %lx",TimeString,(unsigned long)retVal);
         fflush(stdout);
      }
 
@@ -2367,7 +2398,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)
         {
@@ -2579,7 +2610,7 @@ DPT_RTN_T osdGetSysInfo(sysInfo_S *SysIn
   if(Verbose)
     {
       FormatTimeString(TimeString,time(0));
-      printf("\nosdGetSysInfo  : %s Return = %d",TimeString,retVal);
+      printf("\nosdGetSysInfo  : %s Return = %ld",TimeString,(unsigned long)retVal);
       fflush(stdout);
     }
   return (retVal);
@@ -2647,7 +2678,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 +2813,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;
@@ -2900,8 +2931,8 @@ DPT_RTN_T osdLoggerCmd( DPT_MSG_T cmd, v
      {
        FormatTimeString(TimeString,time(0));
        printf(
-        "\nosdLoggerCmd   : %s Cmd = %x,ioMethod = %x,LoggerID = %x,Hba = %x",
-        TimeString,cmd,ioMethod,LoggerID,hbanum);
+        "\nosdLoggerCmd   : %s Cmd = %lx,ioMethod = %x,LoggerID = %lx,Hba = %lx",
+        TimeString,(unsigned long)cmd,ioMethod,LoggerID,hbanum);
         fflush(stdout);
      }
 
@@ -3387,7 +3418,7 @@ DPT_RTN_T osdLoggerCmd( DPT_MSG_T cmd, v
    if(Verbose)
      {
        FormatTimeString(TimeString,time(0));
-       printf("\n               : %s Return = %x",TimeString,retVal);
+       printf("\n               : %s Return = %lx",TimeString,(unsigned long)retVal);
        fflush(stdout);
      }
    return (retVal);
@@ -3421,11 +3452,11 @@ void *osdAllocIO(uLONG size)
  {
    void *Rtnval;
 
-   Rtnval = (void *)malloc((uINT)size);
+   Rtnval = (void *)malloc((size_t)size);
    if(Verbose)
      {
        FormatTimeString(TimeString,time(0));
-       printf("\nosdAllocIO     : %s Return = %x",TimeString,Rtnval);
+       printf("\nosdAllocIO     : %s Return = %lx",TimeString,(unsigned long)Rtnval);
        fflush(stdout);
      }
 
@@ -3459,7 +3490,7 @@ void osdFreeIO(void *buff_P)
    if(Verbose)
      {
        FormatTimeString(TimeString,time(0));
-       printf("\nosdFreeIO      : %s Buf = %x",TimeString,buff_P);
+       printf("\nosdFreeIO      : %s Buf = %lx",TimeString,(unsigned long)buff_P);
        fflush(stdout);
      }
 
@@ -3613,7 +3644,7 @@ DPT_RTN_T  osdCheckBLED(uSHORT ctlrNum,
   if(Verbose)
     {
       FormatTimeString(TimeString,time(0));
-      printf("\nosdCheckBLED   : %s Return = %d",TimeString,retVal);
+      printf("\nosdCheckBLED   : %s Return = %ld",TimeString,(unsigned long)retVal);
       fflush(stdout);
     }
   return (retVal);
@@ -3743,16 +3774,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 Controllers; 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 Controller, 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
 
--- raidutils-0.0.6.orig/raideng/raid.h
+++ raidutils-0.0.6/raideng/raid.h
@@ -210,8 +210,8 @@ struct raidParent_S : public raidRange_S
 #define	FLG_REQ_SUPPRESS	0x8000
 
 //permit - bit definitions
-  // 1=Components can have removeable media
-#define	FLG_COMP_REMOVEABLE	0x0001
+  // 1=Components can have removable media
+#define	FLG_COMP_REMOVABLE	0x0001
   // 1=Components can be emulated drives
 #define FLG_COMP_EMULATED	0x0002
   // 1=Components must be from the same vendor
@@ -271,7 +271,7 @@ struct raidDef_S : public raidDefinition
 
 // Constructor/Destructor.............................
 
-			raidDef_S::raidDef_S();
+			raidDef_S();
 
 };
 #endif  // c++
--- raidutils-0.0.6.orig/raideng/raid_dev.cpp
+++ raidutils-0.0.6/raideng/raid_dev.cpp
@@ -317,13 +317,13 @@ DPT_RTN_T	dptRAIDdev_C::okPermission(rai
 comp_P = comp1_P = (dptRAIDdev_C *) compList.reset();
 
 while ((comp_P!=NULL) && (retVal==MSG_RTN_COMPLETED)) {
-   if (!(def_P->permit & FLG_COMP_REMOVEABLE))
-      if (comp_P->isRemoveable())
-	   // Removeable media devices not permitted
+   if (!(def_P->permit & FLG_COMP_REMOVABLE))
+      if (comp_P->isRemovable())
+	   // Removable media devices not permitted
 	 retVal = MSG_RTN_FAILED | ERR_RAID_COMP_REMOVE;
    if (!(def_P->permit & FLG_COMP_EMULATED))
       if (comp_P->isEmulated())
-	   // Removeable media devices not permitted
+	   // Removable media devices not permitted
 	 retVal = MSG_RTN_FAILED | ERR_RAID_COMP_EMULATED;
    if (!(def_P->permit & FLG_COMP_ANY_TYPE))
       if (comp_P->getObjType()!=def_P->devType)
--- raidutils-0.0.6.orig/raideng/scsi_dev.cpp
+++ raidutils-0.0.6/raideng/scsi_dev.cpp
@@ -124,9 +124,9 @@ if (flg & FLG_DEV_EMULATED)
 if (flg & FLG_DEV_EMU_01)
    scsiFlags |= FLG_ENG_EMU_01;
 
-  // If removeable...
-if (flg & FLG_DEV_REMOVEABLE)
-   scsiFlags |= FLG_ENG_REMOVEABLE;
+  // If removable...
+if (flg & FLG_DEV_REMOVABLE)
+   scsiFlags |= FLG_ENG_REMOVABLE;
 
   // If a valid partition table exists...
 if (flg & FLG_DEV_PTABLE)
@@ -281,8 +281,8 @@ if (isEmulated())
    flg |= FLG_DEV_EMULATED;
 if (scsiFlags & FLG_ENG_EMU_01)
    flg |= FLG_DEV_EMU_01;
-if (isRemoveable())
-   flg |= FLG_DEV_REMOVEABLE;
+if (isRemovable())
+   flg |= FLG_DEV_REMOVABLE;
 if (isLogical())
    flg |= FLG_DEV_LOGICAL;
 if (scsiFlags & FLG_ENG_PTABLE)
--- raidutils-0.0.6.orig/raideng/semaphor.c
+++ raidutils-0.0.6/raideng/semaphor.c
@@ -434,7 +434,7 @@ SEMAPHORE_T osdCreateSemaphore()
     rtnVal = privateCreateUnnamedSemaphore(0);
 
     if (Verbose)
-        printf("\nosdCreateSemaphore   : Rtn = %x", rtnVal);
+        printf("\nosdCreateSemaphore   : Rtn = %lx", (unsigned long)rtnVal);
 
     return(rtnVal);
 }
@@ -475,7 +475,7 @@ SEMAPHORE_T osdCreateNamedSemaphore(char
     rtnVal = privateCreateNamedSemaphore(temp, 0);
 
     if (Verbose)
-        printf("\nosdCreateNamedSemaphore   : Rtn = %x", rtnVal);
+        printf("\nosdCreateNamedSemaphore   : Rtn = %lx", (unsigned long)rtnVal);
 
     return(rtnVal);
 }
@@ -714,7 +714,7 @@ uLONG osdRequestSemaphore(SEMAPHORE_T se
     }
 
     if (Verbose)
-        printf("\nosdRequestSemaphore   : Rtn = %x\n", rtnVal);
+        printf("\nosdRequestSemaphore   : Rtn = %lx\n", rtnVal);
 
     return(rtnVal);
 }
@@ -885,7 +885,7 @@ SEMAPHORE_T osdCreateEventSemaphore()
     rtnVal = privateCreateUnnamedSemaphore(1);
 
     if (Verbose)
-        printf("\nosdCreateEventSemaphore   : Rtn = %x", rtnVal);
+        printf("\nosdCreateEventSemaphore   : Rtn = %lx", (unsigned long)rtnVal);
 
     return(rtnVal);
 }
@@ -923,7 +923,7 @@ SEMAPHORE_T osdCreateNamedEventSemaphore
     rtnVal = privateCreateNamedSemaphore(temp, 1);
 
     if (Verbose)
-        printf("\nosdCreateNamedEventSemaphore   : Rtn = %x", rtnVal);
+        printf("\nosdCreateNamedEventSemaphore   : Rtn = %lx", (unsigned long)rtnVal);
 
     return(rtnVal);
 }
--- raidutils-0.0.6.orig/raideng/unreslvd.cpp
+++ raidutils-0.0.6/raideng/unreslvd.cpp
@@ -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);
    }
 
--- raidutils-0.0.6.orig/raidutil/Makefile.am
+++ raidutils-0.0.6/raidutil/Makefile.am
@@ -1,4 +1,4 @@
-bin_PROGRAMS=raidutil
+sbin_PROGRAMS=raidutil
 raidutil_SOURCES=alarm.cpp bufiolsb.c cmdlist.cpp command.cpp config.cpp creatrad.cpp deletrad.cpp dynsize.cpp engiface.cpp eventlog.cpp expand.cpp flash.cpp flashmem.cpp forcest.cpp id_list.cpp intlist.cpp listdev.cpp lzssdon.cpp lzstrbuf.cpp modnvram.cpp namarray.cpp nvrambit.cpp parsargv.cpp parser.cpp parserr.cpp raidutil.cpp rawdata.cpp rdutlosd.cpp rmwflash.cpp rstnvram.cpp scsilist.cpp setcache.cpp setrate.cpp setspeed.cpp showinq.cpp status.cpp strlist.cpp taskctrl.cpp uartdmp.cpp usage.cpp zap.cpp setscfg.cpp segment.cpp swap_em.c
-raidutil_CPPFLAGS=-O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -I../include
+raidutil_CPPFLAGS=-O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -I$(top_srcdir)/include
 raidutil_LDADD=../lib/libraidutil.la
--- raidutils-0.0.6.orig/raidutil/alarm.cpp
+++ raidutils-0.0.6/raidutil/alarm.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 11 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:15  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/alarm.hpp
+++ raidutils-0.0.6/raidutil/alarm.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -58,7 +61,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 );
--- raidutils-0.0.6.orig/raidutil/cmdlist.cpp
+++ raidutils-0.0.6/raidutil/cmdlist.cpp
@@ -39,9 +39,12 @@
 					solution in coding C++ without STL.
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/cmdlist.hpp
+++ raidutils-0.0.6/raidutil/cmdlist.hpp
@@ -43,9 +43,12 @@
 					solution.
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/command.cpp
+++ raidutils-0.0.6/raidutil/command.cpp
@@ -41,9 +41,12 @@
                                         gathered by the derived object.
 * Version Control:
 *
-* $Revision: 45 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -600,8 +603,8 @@ Command::Dpt_Error::operator    char *()
 		 constant_Str = EventStrings[STR_ERR_FWD_BLK_OVERFLOW];
 		 break;
 
-		case DPT_ERR_RSV_REMOVEABLE:
-		 constant_Str = EventStrings[STR_ERR_RSV_REMOVEABLE];
+		case DPT_ERR_RSV_REMOVABLE:
+		 constant_Str = EventStrings[STR_ERR_RSV_REMOVABLE];
 		 break;
 
 		case DPT_ERR_RSV_NOT_DASD:
@@ -2146,7 +2149,7 @@ char *Command::Strip_Trailing_Whitespace
 char Command::PrintAQuestion(char *str)
 {
    char Buffer[512];
-   fprintf(stderr, str);
+   fprintf(stderr, "%s", str);
    fgets(Buffer, sizeof(Buffer), stdin);
    return(Buffer[0]);
 }
@@ -2237,13 +2240,6 @@ void Command::MakeArrayOptimal(DPT_TAG_T
 }
 
 
-#ifdef sparc
-# define VOLATILE volatile
-#else
-# define VOLATILE
-#endif
-
-extern "C" { VOLATILE void exit (int);}
 
 void Command::Init_Engine(int scanHbasOnly)
 {
@@ -2256,8 +2252,8 @@ void Command::Init_Engine(int scanHbasOn
       {
          engine->Disconnect();
          engine->Close();
-         printf (EventStrings[STR_ENG_CONN_FAILED]);
-         printf (EventStrings[STR_COLON_OPEN]);
+         printf ("%s", EventStrings[STR_ENG_CONN_FAILED]);
+         printf ("%s", EventStrings[STR_COLON_OPEN]);
          exit (1);  // exit with error
       }
 
@@ -2273,8 +2269,8 @@ void Command::Init_Engine(int scanHbasOn
       {
          engine->Disconnect();
          engine->Close();
-         printf (EventStrings[STR_ENG_CONN_FAILED]);
-         printf (EventStrings[STR_COLON_COMPAT_NBR]);
+         printf ("%s", EventStrings[STR_ENG_CONN_FAILED]);
+         printf ("%s", EventStrings[STR_COLON_COMPAT_NBR]);
          exit (1);  // exit with error
       }
 #endif
@@ -2285,8 +2281,8 @@ void Command::Init_Engine(int scanHbasOn
          {
             engine->Disconnect();
             engine->Close();
-            printf (EventStrings[STR_ENG_CONN_FAILED]);
-            printf (EventStrings[STR_COLON_SCAN_FAILED]);
+            printf ("%s", EventStrings[STR_ENG_CONN_FAILED]);
+            printf ("%s", EventStrings[STR_COLON_SCAN_FAILED]);
             exit (1);  // exit with error
          }
       }
@@ -2296,8 +2292,8 @@ void Command::Init_Engine(int scanHbasOn
          {
             engine->Disconnect();
             engine->Close();
-            printf (EventStrings[STR_ENG_CONN_FAILED]);
-            printf (EventStrings[STR_COLON_SCAN_FAILED]);
+            printf ("%s", EventStrings[STR_ENG_CONN_FAILED]);
+            printf ("%s", EventStrings[STR_COLON_SCAN_FAILED]);
             exit (1);  // exit with error
          }
       }
--- raidutils-0.0.6.orig/raidutil/command.hpp
+++ raidutils-0.0.6/raidutil/command.hpp
@@ -44,9 +44,12 @@
 *                       gathered by the derived object.
 * Version Control:
 *
-* $Revision: 37 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -259,7 +262,7 @@ class Command
                     DPT_ERR_FWD_NOT_INITIALIZED = ERR_FWD_NOT_INITIALIZED,
                     DPT_ERR_FWD_BLK_MISMATCH    = ERR_FWD_BLK_MISMATCH,
                     DPT_ERR_FWD_BLK_OVERFLOW    = ERR_FWD_BLK_OVERFLOW,
-                    DPT_ERR_RSV_REMOVEABLE      = ERR_RSV_REMOVEABLE,
+                    DPT_ERR_RSV_REMOVABLE      = ERR_RSV_REMOVABLE,
                     DPT_ERR_RSV_NOT_DASD        = ERR_RSV_NOT_DASD,
                     DPT_ERR_RSV_NON_ZERO        = ERR_RSV_NON_ZERO,
                     DPT_ERR_RSV_HBA_UNABLE      = ERR_RSV_HBA_UNABLE,
--- raidutils-0.0.6.orig/raidutil/config.cpp
+++ raidutils-0.0.6/raidutil/config.cpp
@@ -38,9 +38,12 @@
 * Description:		This command loads and saves controller configuration
 * Version Control:
 *
-* $Revision: 7 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -109,7 +112,6 @@ Command::Dpt_Error Config::execute (Stri
 
 	int		dev_Index = 0;
 	bool	more_Devs_Left = true;
-	bool	first_time_through = true;
 	bool	cluster_ON = false;
 
 	for(dev_Index = 0; more_Devs_Left && !err.Is_Error(); dev_Index ++){
--- raidutils-0.0.6.orig/raidutil/config.hpp
+++ raidutils-0.0.6/raidutil/config.hpp
@@ -41,9 +41,12 @@
 * Description:		This command loads and saves controller configuration
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/creatrad.cpp
+++ raidutils-0.0.6/raidutil/creatrad.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 45 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/creatrad.hpp
+++ raidutils-0.0.6/raidutil/creatrad.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 13 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/debug.hpp
+++ raidutils-0.0.6/raidutil/debug.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/deletrad.cpp
+++ raidutils-0.0.6/raidutil/deletrad.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 22 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/deletrad.hpp
+++ raidutils-0.0.6/raidutil/deletrad.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 6 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/dynsize.cpp
+++ raidutils-0.0.6/raidutil/dynsize.cpp
@@ -39,9 +39,12 @@
 *                   class.
 * Version Control:
 *
-* $Revision: 3 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/dynsize.h
+++ raidutils-0.0.6/raidutil/dynsize.h
@@ -42,9 +42,12 @@
 *                   class.
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-05-05 12:41:44  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/eventlog.cpp
+++ raidutils-0.0.6/raidutil/eventlog.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 42 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/eventlog.hpp
+++ raidutils-0.0.6/raidutil/eventlog.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 7 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -77,7 +80,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();
--- raidutils-0.0.6.orig/raidutil/expand.cpp
+++ raidutils-0.0.6/raidutil/expand.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 4 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/expand.hpp
+++ raidutils-0.0.6/raidutil/expand.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -55,7 +58,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);
--- raidutils-0.0.6.orig/raidutil/flash.cpp
+++ raidutils-0.0.6/raidutil/flash.cpp
@@ -39,9 +39,12 @@
 * Description:          This command flashes the specified controller
 * Version Control:
 *
-* $Revision: 68 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-05-05 12:45:48  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -176,13 +179,7 @@ Flash::Flash(
 Flash::Flash( const Flash &right )
 {
    ENTER( "Flash::Flash(" );
-
-#if defined _DPT_UNIXWARE || defined _DPT_SCO
    Flash( right.source, right.Resync, right.hba_Num );
-#else
-   Flash::Flash( right.source, right.Resync, right.hba_Num );
-#endif
-
    EXIT();
 }
 
--- raidutils-0.0.6.orig/raidutil/flash.hpp
+++ raidutils-0.0.6/raidutil/flash.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 18 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-05-05 12:43:39  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/flashmem.cpp
+++ raidutils-0.0.6/raidutil/flashmem.cpp
@@ -59,9 +59,12 @@
 *
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-05-05 12:49:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/flashmem.h
+++ raidutils-0.0.6/raidutil/flashmem.h
@@ -60,9 +60,12 @@
 *
 * Version Control:
 *
-* $Revision: 4 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-05-05 12:46:43  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/forcest.cpp
+++ raidutils-0.0.6/raidutil/forcest.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 10 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/forcest.hpp
+++ raidutils-0.0.6/raidutil/forcest.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -65,7 +68,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();
 
--- raidutils-0.0.6.orig/raidutil/intlist.cpp
+++ raidutils-0.0.6/raidutil/intlist.cpp
@@ -39,9 +39,12 @@
 					solution in coding C++ without STL.
 * Version Control:
 *
-* $Revision: 7 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/intlist.hpp
+++ raidutils-0.0.6/raidutil/intlist.hpp
@@ -41,9 +41,12 @@
 * Description:      This file serves as a container class, holding a list of items.
 * Version Control:
 *
-* $Revision: 7 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/listdev.cpp
+++ raidutils-0.0.6/raidutil/listdev.cpp
@@ -38,9 +38,12 @@
 * Description:		This command lists all
 * Version Control:
 *
-* $Revision: 97 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -2336,7 +2339,7 @@ Command::Dpt_Error	List_Device::List_Tag
 		if (more_Devs_Left)
 		{
       	char tempBuf[5];
-		   sprintf (tempBuf, "%d", this_Objs_Tag);
+		   sprintf (tempBuf, "%d", (int)this_Objs_Tag);
    		output.add_Item (tempBuf);
 
   			err |= List_This_Device (output, this_Objs_Tag, devs_Type);
--- raidutils-0.0.6.orig/raidutil/listdev.hpp
+++ raidutils-0.0.6/raidutil/listdev.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 23 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/lzstrbuf.cpp
+++ raidutils-0.0.6/raidutil/lzstrbuf.cpp
@@ -41,9 +41,12 @@
 *
 * Version Control:
 *
-* $Revision: 3 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-05-05 12:49:55  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/lzstrbuf.h
+++ raidutils-0.0.6/raidutil/lzstrbuf.h
@@ -41,9 +41,12 @@
 * Description:		Contains the declaration of the LzInStreamBuf class.
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-05-05 12:47:27  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/modnvram.cpp
+++ raidutils-0.0.6/raidutil/modnvram.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 6 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/modnvram.hpp
+++ raidutils-0.0.6/raidutil/modnvram.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 8 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/namarray.cpp
+++ raidutils-0.0.6/raidutil/namarray.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/namarray.hpp
+++ raidutils-0.0.6/raidutil/namarray.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -58,7 +61,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();
 
--- raidutils-0.0.6.orig/raidutil/nvrambit.cpp
+++ raidutils-0.0.6/raidutil/nvrambit.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/nvrambit.hpp
+++ raidutils-0.0.6/raidutil/nvrambit.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/pagemod.hpp
+++ raidutils-0.0.6/raidutil/pagemod.hpp
@@ -41,9 +41,12 @@
 * Description:		This toggles pagenation mode on and off.
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/parsargv.cpp
+++ raidutils-0.0.6/raidutil/parsargv.cpp
@@ -40,9 +40,12 @@
 					ctor to construct that.
 * Version Control:
 *
-* $Revision: 6 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/parsargv.hpp
+++ raidutils-0.0.6/raidutil/parsargv.hpp
@@ -43,9 +43,12 @@
 					ctor to construct that.
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/parser.cpp
+++ raidutils-0.0.6/raidutil/parser.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 101 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -383,7 +386,7 @@ Parser::Parser(
                         // default is NOT to resync
                         // change later when bad cache issue corrected.
 
-                        if (command_Line !='\0')
+                        if (command_Line != 0)
                         {
                            // see if resync is set on/enable
                            if (isdigit(*string_Arg))
@@ -730,6 +733,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);
@@ -956,7 +960,7 @@ WE_CAN_WRITE_CACHE:
                     // change later when bad cache issue corrected.
                     int resync = 0;
 
-                    if (command_Line !='\0')
+                    if (*command_Line != 0)
                     {
                         // see if resync is set on/enable
                         if (is_Int_Arg)
@@ -1586,7 +1590,7 @@ END_OF_VERB:
                         // change later when bad cache issue corrected.
                         int resync = 0;
 
-                        if (command_Line !='\0')
+                        if (*command_Line != 0)
                         {
                             // see if resync is set on/enable
                         command_Line = TranslateNext(command_Line, &resync);
@@ -1645,7 +1649,7 @@ END_OF_VERB:
                     temp = new NvramBit (Cache_Stale, params.hba_Num, temp_set);
                 else
                     temp = new NvramBit (Cache_Stale, -1, temp_set);
-                    cmd_List->add_Item (*temp);
+                cmd_List->add_Item (*temp);
                 delete temp;
             }
             else if (!strncmp(command_Line, "+cluster", strlen("cluster")))
--- raidutils-0.0.6.orig/raidutil/parser.hpp
+++ raidutils-0.0.6/raidutil/parser.hpp
@@ -43,9 +43,12 @@
 					This array can then be fetched and executed.
 * Version Control:
 *
-* $Revision: 9 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/parserr.cpp
+++ raidutils-0.0.6/raidutil/parserr.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/parserr.hpp
+++ raidutils-0.0.6/raidutil/parserr.hpp
@@ -43,9 +43,12 @@
 					not previous commnads that parsed right (I think).
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:15  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/quietmod.hpp
+++ raidutils-0.0.6/raidutil/quietmod.hpp
@@ -41,9 +41,12 @@
 * Description:		This toggles quiet mode on and off.
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:15  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/raidutil.cpp
+++ raidutils-0.0.6/raidutil/raidutil.cpp
@@ -39,9 +39,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 123 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -368,7 +371,7 @@ void Flush ( String_List * output )
    bool pageMode = mode.GetPagenationMode();
 
    // loop through the items in this command and display them
-   while( out_Str = output->get_Next_Item() )
+   while( (out_Str = output->get_Next_Item()) )
    {
       char temp_Buf[ 512 ];
       char stripped_Str[ 160 ];
@@ -459,7 +462,7 @@ void Flush ( String_List * output )
             PressAnyKeyToContinue();  // netware only
 #else         
             // hey, wait a minute for next page!!!
-            printf(EventStrings[STR_PRESS_ENTER2_CONT]);
+            printf("%s", EventStrings[STR_PRESS_ENTER2_CONT]);
             int key = getchar();
 #endif            
          }
--- raidutils-0.0.6.orig/raidutil/rawdata.cpp
+++ raidutils-0.0.6/raidutil/rawdata.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/rawdata.hpp
+++ raidutils-0.0.6/raidutil/rawdata.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:15  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/rdutlosd.cpp
+++ raidutils-0.0.6/raidutil/rdutlosd.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/rdutlosd.h
+++ raidutils-0.0.6/raidutil/rdutlosd.h
@@ -41,9 +41,12 @@
 * Description:      This is the OS dependent constants, etc. for DptUtil.
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/rmwflash.cpp
+++ raidutils-0.0.6/raidutil/rmwflash.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 4 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/rmwflash.hpp
+++ raidutils-0.0.6/raidutil/rmwflash.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -59,7 +62,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();
 
--- raidutils-0.0.6.orig/raidutil/rscenum.h
+++ raidutils-0.0.6/raidutil/rscenum.h
@@ -593,7 +593,7 @@ enum StringNames {
 	STR_ERR_FWD_NOT_INITIALIZED,
 	STR_ERR_FWD_BLK_MISMATCH,   
 	STR_ERR_FWD_BLK_OVERFLOW,   
-	STR_ERR_RSV_REMOVEABLE,
+	STR_ERR_RSV_REMOVABLE,
 	STR_ERR_RSV_NOT_DASD,  
 	STR_ERR_RSV_NON_ZERO,  
 	STR_ERR_RSV_HBA_UNABLE,
--- raidutils-0.0.6.orig/raidutil/rscstrs.h
+++ raidutils-0.0.6/raidutil/rscstrs.h
@@ -96,7 +96,7 @@ char * EventStrings[] =
 	"-e [soft|recov|nonrecov|status|delete|board|?|-?] d@View the controller's event log", //STR_USAGE_VIEW_LOG
 	"-f [optimal|fail|?|-?] d@Force an array member drive to Failed state, or force an array to Optimal state", //STR_USAGE_FORCE_STATE
 	"-K@Report on cluster support enabled/disabled", //STR_USAGE_CLUSTER_SUPPORT
-	"Commmand Usage Examples:               ~", //STR_USAGE_SAMPLE_TITLE
+	"Command Usage Examples:                ~", //STR_USAGE_SAMPLE_TITLE
 	"-q@Quiet mode", //STR_USAGE_SAMPLE_QUIET_MODE
 	"-?@Display usage screen", //STR_USAGE_SAMPLE_SHOW_USAGE
 #if !defined _DPT_SOLARIS
@@ -332,7 +332,7 @@ char * EventStrings[] =
 //     STR_STATUS                        = 160,
 //     STR_RAID_INFO                     = 161,
 //     STR_SCSI_INFO                     = 162,
-   "Removeable", // STR_REMOVABLE
+   "Removable", // STR_REMOVABLE
 //     STR_CAPABILITIES                  = 164,
 //     STR_REL_ADDR                      = 165,
    "wide",       // STR_WIDE
@@ -607,7 +607,7 @@ char * EventStrings[] =
    "Error: fwd not initialized",//STR_ERR_FWD_NOT_INITIALIZED 
    "Error: fwd blk mismatch",   //STR_ERR_FWD_BLK_MISMATCH   
    "Error: fwd blk overflow",   //STR_ERR_FWD_BLK_OVERFLOW   
-   "Error: rsv removeable",     //STR_ERR_RSV_REMOVEABLE     
+   "Error: rsv removable",     //STR_ERR_RSV_REMOVABLE     
    "Error: rsv not dasd",  //STR_ERR_RSV_NOT_DASD  
    "Error: rsv non zero",  //STR_ERR_RSV_NON_ZERO  
    "Error: rsv hba unable",//STR_ERR_RSV_HBA_UNABLE
--- raidutils-0.0.6.orig/raidutil/rstnvram.cpp
+++ raidutils-0.0.6/raidutil/rstnvram.cpp
@@ -39,9 +39,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 12 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/rstnvram.hpp
+++ raidutils-0.0.6/raidutil/rstnvram.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 4 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/rustring.h
+++ raidutils-0.0.6/raidutil/rustring.h
@@ -41,9 +41,12 @@
 * Description:		English Language Strings for DptUtil
 * Version Control:
 *
-* $Revision: 79 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:15  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/scsiaddr.hpp
+++ raidutils-0.0.6/raidutil/scsiaddr.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/scsilist.cpp
+++ raidutils-0.0.6/raidutil/scsilist.cpp
@@ -39,9 +39,12 @@
 					solution in coding C++ without STL.
 * Version Control:
 *
-* $Revision: 8 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/scsilist.hpp
+++ raidutils-0.0.6/raidutil/scsilist.hpp
@@ -42,9 +42,12 @@
 					addresses.
 * Version Control:
 *
-* $Revision: 7 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/segment.hpp
+++ raidutils-0.0.6/raidutil/segment.hpp
@@ -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();
 
--- raidutils-0.0.6.orig/raidutil/setcache.cpp
+++ raidutils-0.0.6/raidutil/setcache.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 17 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/setcache.hpp
+++ raidutils-0.0.6/raidutil/setcache.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -55,11 +58,11 @@
 class SetCache:public Command
 	{
 	public:
-		SetCache::SetCache(
-				SCSI_Addr_List	*addresses,		// a list of addresses
-				int				on,				// Whether to enable or disable
-				int				rw				// Read or write cacheing.
-				);								// to delete raid tables on
+		SetCache(
+			SCSI_Addr_List	*addresses,		// a list of addresses
+			int				on,				// Whether to enable or disable
+			int				rw				// Read or write cacheing.
+			);								// to delete raid tables on
 		SetCache( const SetCache &new_SetCache );
 		virtual	~SetCache();
 		SetCache	&operator = ( SetCache &right );
--- raidutils-0.0.6.orig/raidutil/setrate.cpp
+++ raidutils-0.0.6/raidutil/setrate.cpp
@@ -38,9 +38,12 @@
 * Description:		This command sets the rebuild rate.
 * Version Control:
 *
-* $Revision: 16 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/setrate.hpp
+++ raidutils-0.0.6/raidutil/setrate.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -59,8 +62,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);
--- raidutils-0.0.6.orig/raidutil/setscfg.cpp
+++ raidutils-0.0.6/raidutil/setscfg.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 1 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -95,4 +98,4 @@ Command &setscfg::Clone() const
         ENTER("Command &setscfg::Clone() const");
         EXIT();
         return(*new setscfg(*this));
-}
\ No newline at end of file
+}
--- raidutils-0.0.6.orig/raidutil/setscfg.hpp
+++ raidutils-0.0.6/raidutil/setscfg.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -59,7 +62,7 @@ class setscfg:public Command
 {
 
 	public:
-		setscfg::setscfg();
+		setscfg();
 		virtual	~setscfg();
 
 		Dpt_Error execute(String_List **output);
--- raidutils-0.0.6.orig/raidutil/setspeed.cpp
+++ raidutils-0.0.6/raidutil/setspeed.cpp
@@ -38,9 +38,12 @@
 * Description:		This command sets the bus speed.
 * Version Control:
 *
-* $Revision: 13 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/setspeed.hpp
+++ raidutils-0.0.6/raidutil/setspeed.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/showinq.cpp
+++ raidutils-0.0.6/raidutil/showinq.cpp
@@ -39,9 +39,12 @@
 					passed in.
 * Version Control:
 *
-* $Revision: 13 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -215,7 +218,7 @@ SHOW_PHYSICAL:
 				output.add_Item( "\n" );
 				output.add_Item(EventStrings[STR_REMOVABLE]);
 				output.add_Item( ":" );
-				output.add_Item( ( engine->devInfo_P->flags & FLG_DEV_REMOVEABLE)? EventStrings[STR_YES]:EventStrings[STR_NO]);
+				output.add_Item( ( engine->devInfo_P->flags & FLG_DEV_REMOVABLE)? EventStrings[STR_YES]:EventStrings[STR_NO]);
 				output.add_Item( "\n" );
 				break;
 
@@ -317,7 +320,7 @@ SHOW_PHYSICAL:
 	   			output.add_Item( ":" );
 					output.add_Item( obj_Type_Str );
 					output.add_Item( "\n" );
-					// output.add_Item( ( engine->devInfo_P->flags & FLG_DEV_REMOVEABLE )? STR_YES:STR_NO );
+					// output.add_Item( ( engine->devInfo_P->flags & FLG_DEV_REMOVABLE )? STR_YES:STR_NO );
 					output.add_Item( "\n" );
 					}
 				break;
--- raidutils-0.0.6.orig/raidutil/showinq.hpp
+++ raidutils-0.0.6/raidutil/showinq.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 5 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:12  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/strlist.cpp
+++ raidutils-0.0.6/raidutil/strlist.cpp
@@ -39,9 +39,12 @@
 					solution in coding C++ without STL.
 * Version Control:
 *
-* $Revision: 7 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/strlist.hpp
+++ raidutils-0.0.6/raidutil/strlist.hpp
@@ -42,9 +42,12 @@
 					solution in coding C++ without STL.
 * Version Control:
 *
-* $Revision: 6 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:13  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/taskctrl.cpp
+++ raidutils-0.0.6/raidutil/taskctrl.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 15 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/taskctrl.hpp
+++ raidutils-0.0.6/raidutil/taskctrl.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 4 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -59,7 +62,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();
 
--- raidutils-0.0.6.orig/raidutil/uartdmp.cpp
+++ raidutils-0.0.6/raidutil/uartdmp.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 9 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/uartdmp.hpp
+++ raidutils-0.0.6/raidutil/uartdmp.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 3 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -59,7 +62,7 @@ class UartDmp:public Command
 {
 
 	public:
-		UartDmp::UartDmp(int hbaNo, char *fileName);
+		UartDmp(int hbaNo, char *fileName);
 		UartDmp(const UartDmp &new_UartDmp);
 		virtual	~UartDmp();
 
--- raidutils-0.0.6.orig/raidutil/usage.cpp
+++ raidutils-0.0.6/raidutil/usage.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 35 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/usage.hpp
+++ raidutils-0.0.6/raidutil/usage.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 3 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:11  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
--- raidutils-0.0.6.orig/raidutil/zap.cpp
+++ raidutils-0.0.6/raidutil/zap.cpp
@@ -38,9 +38,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 24 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.1.1.1  2004-04-29 10:20:14  bap
+* Imported upstream version 0.0.4. 
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -209,7 +212,7 @@ Command::Dpt_Error	Zap::execute( String_
 		char Buffer[ 512 ];
 
 #if !defined _DPT_NETWARE
-      fprintf (stderr, EventStrings[STR_RU_SURE_TO_ZAP]);
+      fprintf (stderr, "%s", EventStrings[STR_RU_SURE_TO_ZAP]);
 		fgets (Buffer, sizeof(Buffer), stdin);
 		if (( Buffer[0] != *char1 ) && ( Buffer[0] != *(char1+1)))
 		{
@@ -276,8 +279,8 @@ Command::Dpt_Error	Zap::execute( String_
                         PrintRaidAddress(component_Tag, out);
          				(*output)->add_Item("\n");
 					    Flush( *output );
-    	            	fprintf (stderr, EventStrings[STR_DRIVE_IS_BUSY]);
-                     fprintf (stderr, EventStrings[STR_RU_SURE_TO_ZAP]);
+    	            	fprintf (stderr, "%s", EventStrings[STR_DRIVE_IS_BUSY]);
+                     fprintf (stderr, "%s", EventStrings[STR_RU_SURE_TO_ZAP]);
 	    	            fgets (Buffer, sizeof(Buffer), stdin);
                		if (( Buffer[0] != *char1 ) && ( Buffer[0] != *(char1+1)))
                 		{
--- raidutils-0.0.6.orig/raidutil/zap.hpp
+++ raidutils-0.0.6/raidutil/zap.hpp
@@ -41,9 +41,12 @@
 * Description:
 * Version Control:
 *
-* $Revision: 2 $
+* $Revision$
 * $NoKeywords: $
-* $Log: $
+* $Log$
+* Revision 1.2  2006-03-13 03:15:15  bap
+* GCC 4.1 patch
+*
 *****************************************************************************/
 
 /*** INCLUDES ***/
@@ -55,7 +58,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
