diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG
index 5253becb4efe75db7eb9ff40473c393d155ff89e..5e1e2b426846e6a91c5e86c12e4badb9106c982b 100644
--- a/sm5/CHANGELOG
+++ b/sm5/CHANGELOG
@@ -1,6 +1,6 @@
 CHANGELOG for smartmontools
 
-$Id: CHANGELOG,v 1.466 2004/09/05 13:58:02 dpgilbert Exp $
+$Id: CHANGELOG,v 1.467 2004/09/05 21:04:56 ballen4705 Exp $
 
 The most recent version of this file is:
 http://cvs.sourceforge.net/viewcvs.py/smartmontools/sm5/CHANGELOG?sortby=date&view=markup
@@ -31,10 +31,12 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <ADDITIONS TO THE CHANGE LOG SHOULD BE ADDED JUST BELOW HERE, PLEASE>
 
+smartmontools 5.33 Experimental Release
+
   [DG] [SCSI] Decode Last n error events log page; decode track following
        and positioning errors [Hitachi]
 
-  [EM] Another tweak, __packed__ introduced in Version 5.0040
+  [EM] FreeBSD: another tweak, __packed__ introduced in Version 5.0040
 
   [EM] Cleaner tweak of fixes for FreeBSD 4.x.
 
diff --git a/sm5/INSTALL b/sm5/INSTALL
index 3519156a08c3d057f14f9bb94ae27c84ef3f737a..e88c83921337bde95d543e32ee3137af074a47a1 100644
--- a/sm5/INSTALL
+++ b/sm5/INSTALL
@@ -1,7 +1,7 @@
 Smartmontools installation instructions
 =======================================
 
-$Id: INSTALL,v 1.54 2004/08/14 20:04:38 chrfranke Exp $
+$Id: INSTALL,v 1.55 2004/09/05 21:04:56 ballen4705 Exp $
 
 Please also see the smartmontools home page:
 http://smartmontools.sourceforge.net/
@@ -14,7 +14,7 @@ Table of contents:
 [4] Guidelines for different Linux distributions
 [5] Guidelines for FreeBSD
 [6] Guidelines for Darwin
-[7] Guidelines for NetBSD
+[7] Guidelines for NetBSD/OpenBSD
 [8] Guidelines for Solaris
 [9] Guidelines for Cygwin
 [10] Guidelines for Windows
@@ -87,7 +87,7 @@ Table of contents:
     systems.  ATA/IDE code only works on SPARC platform.  All tested
     kernels worked correctly.
 
-    D) NetBSD
+    D) NetBSD/OpenBSD
 
     The code was tested on a 1.6ZG (i.e., 1.6-current) system. It should
     also function under 1.6.1 and later releases (unverified).  Currently
@@ -148,7 +148,7 @@ Table of contents:
    * Can't be implemented easily without more kernel-level support,
      so far as I know:
      - running immediate offline, conveyance, or selective tests
-     - running any test in capture mode
+     - running any test in captive mode
      - aborting tests
      - switching on automatic offline testing
      - support for SCSI
@@ -306,8 +306,8 @@ SuSE:
   ./configure --with-initscriptdir=/Library/StartupItems
 
 
-[7] Guidelines for NetBSD
-=========================
+[7] Guidelines for NetBSD/OpenBSD
+=================================
   ./configure --prefix=/usr/pkg                                       \
 	      --with-docdir=/usr/pkg/share/doc/smartmontools
 
diff --git a/sm5/NEWS b/sm5/NEWS
index ce48b03d0c6bca15f5700d62d04e35268226016b..0c3162543e213c13ed76d741e6da24872ae49e1e 100644
--- a/sm5/NEWS
+++ b/sm5/NEWS
@@ -1,10 +1,27 @@
 smartmontools NEWS
 ------------------
-CVS ID: $Id: NEWS,v 1.23 2004/07/07 14:45:19 ballen4705 Exp $
+CVS ID: $Id: NEWS,v 1.24 2004/09/05 21:04:56 ballen4705 Exp $
 
 The most up-to-date version of this file is:
 http://cvs.sourceforge.net/viewcvs.py/smartmontools/sm5/NEWS?sortby=date&view=markup
 
+
+Date 2004-9-5
+Summary: smartmontools release 5.33 (UNSTABLE/EXPERIMENTAL)
+-----------------------------------------------------------
+This is an unstable/experimental release of smartmontools.  It includes
+ - support for Darwin/Mac OSX
+ - support for OpenBSD
+ - support for 3ware ATA RAID controllers under FreeBSD
+ - support for 3ware 9500 series SATA RAID controllers under
+   Linux.  Use /dev/twa[0-15] devices to access these.
+ - support for 3ware character device interfaces /dev/twe[0-15]
+   under Linux.  This allows (for example) Selective Self-tests.
+ - support for Marvell chip-set based SATA controllers under Linux.
+Please report sucess/failure with these items to the
+smartmontools-support mailing list.
+
+
 Date 2004-7-5
 Summary: smartmontools release 5.32 (STABLE)
 -----------------------------------------------------------
diff --git a/sm5/README b/sm5/README
index e0a29342af13515314aa669aead1b2078381c089..b7d364a301d97fe0f3cb7274199e37f4505631f6 100644
--- a/sm5/README
+++ b/sm5/README
@@ -1,8 +1,9 @@
-====================================================
-smartmontools - S.M.A.R.T. utility toolset for Linux
-====================================================
+==========================================================
+smartmontools - S.M.A.R.T. utility toolset for Darwin/Mac
+OSX, FreeBSD, Linux, NetBSD, OpenBSD, Solaris, and Windows.
+==========================================================
 
-$Id: README,v 1.52 2004/08/31 18:20:40 ballen4705 Exp $
+$Id: README,v 1.53 2004/09/05 21:04:56 ballen4705 Exp $
 
 == HOME ==
 The home for smartmontools is located at:
@@ -99,7 +100,7 @@ only files with tag".
 
 == BUILDING/INSTALLING SMARTMONTOOLS ==
 
-Refer to the "INSTALL" file for installation instructions.
+Refer to the "INSTALL" file for detailed installation instructions.
 
 See the "WARNINGS" file for reports of hardware where these utilities
 might cause serious problems such as lockups.
diff --git a/sm5/TODO b/sm5/TODO
index 09923d42b3dd433d6339a523cc2c88173f212580..df25be9a44ac91440b4fa9d6a09cb0e17f64139f 100644
--- a/sm5/TODO
+++ b/sm5/TODO
@@ -1,9 +1,9 @@
 TODO list for smartmontools:
 
-$Id: TODO,v 1.55 2004/08/31 18:20:40 ballen4705 Exp $
+$Id: TODO,v 1.56 2004/09/05 21:04:56 ballen4705 Exp $
 
-SATA devices
-------------
+SATA devices under Linux
+------------------------
 Currently work OK if you use the standard IDE drivers in
 drivers/ide. If you use the new libata drivers, it won't work
 correctly because libata doesn't yet support the needed
@@ -18,8 +18,8 @@ search the Linux Kernel Mailing list to find this patch, or look at the
 thread:
 http://groups.google.de/groups?hl=en&lr=&ie=UTF-8&threadm=2yYBY-4HB-55%40gated-at.bofh.it&rnum=3&prev=/groups%3Fq%3Dsmartmontools%26hl%3Den%26lr%3D%26ie%3DUTF-8%26scoring%3Dd%26selm%3D2yYBY-4HB-55%2540gated-at.bofh.it%26rnum%3D3
 
-USB devices
------------
+USB devices under Linux
+-----------------------
 Some USB devices can hang smartctl or smartd.  This is because these
 devices fail to comply with SCSI specifications for their packet
 command sets.  Work on improving the detection and bail-out procedures
@@ -95,6 +95,8 @@ that can be monitored.
 FreeBSD
 -------
 
+Add support for 3ware 9000 series SATA controllers.
+
 Cygwin and Windows
 ------------------
 Add IDE/ATA selective self test and check power mode.
diff --git a/sm5/configure.in b/sm5/configure.in
index 8298afd736d6778e7287248ae0e938ac6e18ed5b..7cba36c7e84bd3d067a9e87e1dce2b2d6e821e26 100644
--- a/sm5/configure.in
+++ b/sm5/configure.in
@@ -1,5 +1,5 @@
 #
-# $Id: configure.in,v 1.94 2004/08/30 19:12:14 guidog Exp $
+# $Id: configure.in,v 1.95 2004/09/05 21:04:56 ballen4705 Exp $
 #
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.50)
@@ -7,9 +7,9 @@ AC_INIT(smartmontools, 5.33, smartmontools-support@lists.sourceforge.net)
 AC_CONFIG_SRCDIR(smartctl.c)
 
 smartmontools_configure_date=`date -u +"%Y/%m/%d %T %Z"`
-smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.94 2004/08/30 19:12:14 guidog Exp $'`
-smartmontools_release_date=2004/07/05
-smartmontools_release_time="08:10:26 UTC"
+smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.95 2004/09/05 21:04:56 ballen4705 Exp $'`
+smartmontools_release_date=2004/09/05
+smartmontools_release_time="21:01:42 UTC"
 
 AC_DEFINE_UNQUOTED(SMARTMONTOOLS_CONFIGURE_ARGS, "$ac_configure_args",            [smartmontools Configure Arguments])
 AC_DEFINE_UNQUOTED(SMARTMONTOOLS_CONFIGURE_DATE, "$smartmontools_configure_date", [smartmontools Configure Date])
diff --git a/sm5/do_release b/sm5/do_release
index 0031f5c239c64aafe6f0aefda5146da4a1f900a6..0698efbd4707fe122c3548cc94c4a9b63d03dfcb 100755
--- a/sm5/do_release
+++ b/sm5/do_release
@@ -3,7 +3,7 @@
 # do a smartmontools release
 # (C) 2003-4 Bruce Allen <ballen4705@users.sourceforge.net>, 
 #          Guido Guenther <agx@sigxcpu.org>
-# $Id: do_release,v 1.31 2004/07/05 07:41:52 ballen4705 Exp $
+# $Id: do_release,v 1.32 2004/09/05 21:04:56 ballen4705 Exp $
 
 # Notes on generating releases:
 # (1) update NEWS
@@ -59,13 +59,11 @@ if [ -f Makefile ] ; then
   rm -f Makefile configure
 fi
 
-if [ $USECVS -ne 0 ] ; then
-    smartmontools_release_date=`date -u +"%Y/%m/%d"`
-    smartmontools_release_time=`date -u +"%T %Z"`
-    cat configure.in  | sed "s|smartmontools_release_date=.*|smartmontools_release_date=${smartmontools_release_date}|" > configure.tmp
-    cat configure.tmp | sed "s|smartmontools_release_time=.*|smartmontools_release_time=\"${smartmontools_release_time}\"|" > configure.in
-    rm -f configure.tmp
-fi
+smartmontools_release_date=`date -u +"%Y/%m/%d"`
+smartmontools_release_time=`date -u +"%T %Z"`
+cat configure.in  | sed "s|smartmontools_release_date=.*|smartmontools_release_date=${smartmontools_release_date}|" > configure.tmp
+cat configure.tmp | sed "s|smartmontools_release_time=.*|smartmontools_release_time=\"${smartmontools_release_time}\"|" > configure.in
+rm -f configure.tmp
 
 ./autogen.sh
 
diff --git a/sm5/examplescripts/README b/sm5/examplescripts/README
index b424afb2cf47e49d4529f7859420c80061809cf3..9d5c0495b8575226f070b398b044b012f31b9b8c 100644
--- a/sm5/examplescripts/README
+++ b/sm5/examplescripts/README
@@ -1,6 +1,6 @@
 # Home page: http://smartmontools.sourceforge.net
 #
-# $Id: README,v 1.2 2004/01/02 16:05:25 ballen4705 Exp $
+# $Id: README,v 1.3 2004/09/05 21:04:57 ballen4705 Exp $
 #
 # Copyright (C) 2003-4 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 # 
@@ -31,7 +31,7 @@ should display those pages on your system.
 
 If you wish to contribute additional scripts to this collection,
 please email them to <smartmontools-support@lists.sourceforge.net>,
-and include a one-line description to use below.
+and include a brief description to use below.
 
 The files contained in this directory are:
 
diff --git a/sm5/smartctl.8.in b/sm5/smartctl.8.in
index 78e40f4967fac058d5fcc489365a8f14199d3a89..32f8b33408af3e9c100ed86d6eb95fa44cb7a9cf 100644
--- a/sm5/smartctl.8.in
+++ b/sm5/smartctl.8.in
@@ -1,7 +1,7 @@
 .ig
  Copyright (C) 2002-4 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 
- $Id: smartctl.8.in,v 1.62 2004/09/03 19:41:52 chrfranke Exp $
+ $Id: smartctl.8.in,v 1.63 2004/09/05 21:04:56 ballen4705 Exp $
  
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
@@ -61,6 +61,10 @@ devices, and \fB"/dev/sd[a\-z]"\fP for SCSI devices. For
 SCSI Tape Drives and Changers with TapeAlert support use the devices
 \fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. 
 More general paths (such as devfs ones) may also be specified.
+.IP \fBDARWIN\fP: 9
+Use the forms \fB/dev/disk[0\-9]\fP or equivalently \fBdisk[0\-9]\fP or equivalently
+\fB/dev/rdisk[0\-9]\fP.  Long forms are also available: please use \'\-h\' to see some
+examples. Note that there is currently no Darwin SCSI support.
 .IP \fBFREEBSD\fP: 9
 Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA
 devices and \fB"/dev/da[0\-9]+"\fP for SCSI devices.
@@ -1233,7 +1237,7 @@ these documents may be found in the References section of the
 
 .SH
 CVS ID OF THIS PAGE:
-$Id: smartctl.8.in,v 1.62 2004/09/03 19:41:52 chrfranke Exp $
+$Id: smartctl.8.in,v 1.63 2004/09/05 21:04:56 ballen4705 Exp $
 .\" Local Variables:	         
 .\" mode: nroff         
 .\" End:
diff --git a/sm5/smartd.8.in b/sm5/smartd.8.in
index 82fb2c0e0b125cc363adf8b60eb70dec4fd25db6..50ba3d6134794091cf4555bc7b4948cb6f3d7861 100644
--- a/sm5/smartd.8.in
+++ b/sm5/smartd.8.in
@@ -1,7 +1,7 @@
 .ig
 Copyright (C) 2002-4 Bruce Allen <smartmontools-support@lists.sourceforge.net>
  
-$Id: smartd.8.in,v 1.85 2004/09/03 19:41:52 chrfranke Exp $
+$Id: smartd.8.in,v 1.86 2004/09/05 21:04:56 ballen4705 Exp $
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -299,7 +299,7 @@ Intended primarily to help
 .B smartmontools
 developers understand the behavior of
 .B smartmontools
-on non-conforming or poorly conforming hardware.  This option reports
+on non-conforming or poorly-conforming hardware.  This option reports
 details of
 \fBsmartd\fP
 transactions with the device.  The option can be used multiple times.
@@ -1792,4 +1792,4 @@ smartmontools home page at \fBhttp://smartmontools.sourceforge.net/\fP .
 
 .SH
 CVS ID OF THIS PAGE:
-$Id: smartd.8.in,v 1.85 2004/09/03 19:41:52 chrfranke Exp $
+$Id: smartd.8.in,v 1.86 2004/09/05 21:04:56 ballen4705 Exp $
diff --git a/sm5/smartmontools.spec b/sm5/smartmontools.spec
index 181a69217338b0953516ee6a44311e899e7d51f4..96d35abcac85923243e585660e2a4128920cb78d 100644
--- a/sm5/smartmontools.spec
+++ b/sm5/smartmontools.spec
@@ -35,7 +35,7 @@ Packager:       Bruce Allen <smartmontools-support@lists.sourceforge.net>
 # http://ftp1.sourceforge.net/smartmontools/smartmontools-%{version}-%{release}.tar.gz
 
 # CVS ID of this file is:
-# $Id: smartmontools.spec,v 1.160 2004/07/07 14:45:19 ballen4705 Exp $
+# $Id: smartmontools.spec,v 1.161 2004/09/05 21:04:56 ballen4705 Exp $
 
 # Copyright (C) 2002-4 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 # Home page: http://smartmontools.sourceforge.net/
@@ -324,6 +324,115 @@ fi
 # [PW] Phil Williams
 
 %changelog
+* Sun Sep 5 2004 Bruce Allen  <smartmontools-support@lists.sourceforge.net>
+  [DG] [SCSI] Decode Last n error events log page; decode track following
+       and positioning errors [Hitachi]
+  [EM] FreeBSD: another tweak, __packed__ introduced in Version 5.0040
+  [EM] Cleaner tweak of fixes for FreeBSD 4.x.
+  [EM] Fix compilation errors under FreeBSD 4.x, as it is still using
+       and old GCC
+  [EM] Remove 3ware/FreeBSD specific files and just include pieces we need
+  [DG] Add logic in smartd to detect 3ware, Marvell controllers and SATA
+       disks behind an ATA-SCSI simulator (in Linux). If specific device
+       types are not given and they are picked in a general SCSI device
+       scan then warn and skip.
+  [GG] insert correct path to smartd into smartd's init script
+  [BA] Changed all default paths in documentation to reflect /usr/local as
+       default path prefix.  This affects on-line man pages, primarily.
+  [DS] Added support for OpenBSD.
+  [BA] Added another environment variable SMART_FULLMESSAGE set by
+       the smartd mailing feature, and modified examplescripts/Example1
+       to illustrate it.
+  [BA] Fixed potentially misleading messages of the form:
+       XXX failed: success
+  [DG] emit warning if SATA disk detected using libata in Linux; then exit
+  [PW] Added Seagate U10 family, Hitachi Travelstar 7K60, Fujitsu MHR2020AT,
+       and QUANTUM FIREBALLP AS20.5 to knowndrives table.
+  [DG] Detect 3ware and Marvell controllers from SCSI INQUIRY vendor string
+       and suggest usage of appropriate '-d' argument in smartctl.
+  [LW] Tested the RELEASE_5_33_WITH_MARVELL_SUPPORT branch on
+       actual Marvell 88SX5041 hardware, with success.
+       Merged into HEAD.
+  [BA] Fixed nasty DEVICESCAN bug
+  [BA] Checked in RELEASE_5_33_WITH_MARVELL_SUPPORT branch with
+       some Marvell support.
+  [BA] Additional modifications of Ed's controller scheme.  Fixed
+       broken 3ware support under linux, problems with scanning
+       devices in smartd, and other small problems.
+  [EM] Minor change to FreeBSD inclusion of 'twe' include files.  Add 
+       code to check if they exising in /usr/include/sys to use those
+       in preference to ones added here
+  [EM] Very preliminary support attempt for 3Ware controllers under 
+       FreeBSD. Also, switched 'escalade_type/escalade_port' to
+       'controler_type/controller_port' and moved away from 
+       'tryata/tryscsi' to using new 'controller*' variables to 
+       determine which controller type (ATA/SCSI/3Ware) to use.
+  [GK] Added initscript support for Darwin.
+  [CF] Windows smartd: Added ability to run smartd as a windows service,
+       including new commands "smartd install ..." and "smartd remove"
+       to install and remove the service registry entry.
+  [BA] smartd: warn user if -s regexp regular expression contains
+       characters other than 0123456789.*()|+?[-]{}:=SLCO since such
+       characters are 'suspicous' and may indicate a poorly formed
+       regexp.  Extended regular expression gurus: can this list be
+       reduced somewhat?
+  [CF] Fixed bug in Windows smartd: Missing close of config file when
+       configuration is reloaded by smartd daemon.
+  [CF] Windows smartd: Added mail warning feature using the "Blat"
+       (http://blat.sourceforge.net/) mailer as a default.
+  [PW] Added Maxtor DiamondMax Plus 5120 Ultra ATA 33 series and TOSHIBA
+       MK3017GAP to knowndrives table.
+  [CF] Added fixes to build smartmontools on old Linux systems
+       (libc < 6, Kernel 2.0.x).
+  [BA] Added ATA minor version identity strings for latest ATA specification
+       updates: ATA/ATAPI-7 T13 1532D revision 4a and ATA/ATAPI-6 published,
+       ANSI INCITS 361-2002
+  [PW] Added Hitachi Travelstar 5K80 family and Fujitsu MHTxxxxAH family to
+       knowndrives table.
+  [EM] Fix up compilation under FreeBSD < 5.x
+  [PW] Added QUANTUM FIREBALL EX3.2A and missing Western Digital Caviar SE
+       drives to knowndrives table.
+  [BA] Modified Hitachi Travelstar 80GN family regexp in drive database.
+       Thanks to [GK/CF] for problem & solution.
+  [GK] Added os_darwin.[ch]
+  [PW] Added the following drives to the knowndrives table: IBM Travelstar
+       48GH, 30GN, and 15GN family; IBM Deskstar 37GP and 34GXP family;
+       Western Digital WDC WD272AA; Maxtor DiamondMax D540X-4D family;
+       TOSHIBA MK2016GAP, MK2018GAP, MK2018GAS, MK2023GAS; and
+       QUANTUM FIREBALL ST3.2A
+  [BA] smartd/smarctl now print build HOST/OS information as part
+       of startup slogan.  This should make it slightly easier to
+       read bug reports from users.
+  [RZ] Fixed the DEVICESCAN to do what it was supposed to do - give
+       error message unless scanning is in progress.  
+  [BA] Update documentation to describe 3ware character devices. Better
+       error detection for missing/malfunctioning devices behind 3ware
+       controllers. Now pack 3ware ioctl structures explicitly.
+  [BA] For ATA devices that support LBA mode, print capacity as part
+       of smartctl --info
+  [RZ] Made DEVICESCAN quiet about non-existing devices unless debug
+       is on.
+  [DG] treat "unit attention" SCSI warning as try again in some contexts
+       (test unit ready and mode sense)
+  [BA] on drives that store max/min rather than min/max, get order
+       correct in printing temp.
+  [BA] fixed typo in 'smartctl -h' output.  Thanks to Gabor Z. Papp.
+  [BA] linux: clean-up to 3ware/AMCC support; dynamically create
+       or fix /dev/tw[ae][0-15] device node entries if they don't
+       exist or are incorrect. One can now use the character devices
+       /dev/twe[0-15] OR /dev/sd? for 3ware 6000/7000/8000 series
+       cards.  One must use /dev/twa[0-15] for 3ware 9000 series cards.
+       Note that selective self-tests now work via /dev/tw[ae] devices.
+       Next step: documentation.
+  [BA] linux: experimental "support" for 3ware/AMCC 9000 series
+       controllers that use the 3w-9xxx driver.  This will be in a
+       state of flux for a few days.  Note that this requires the
+       character interface /dev/twa[0-15].
+  [DG] linux: extend general SCSI OS interface to use the SG_IO ioctl. If
+       not available, use the older SCSI_IOCTL_SEND_COMMAND ioctl.
+  [KS] Solaris/x86: fixed system identification problem in configure
+       script.  Thanks to Stuart Swales.
+
 * Mon Jul 5 2004 Bruce Allen  <smartmontools-support@lists.sourceforge.net>
   [BA] Update link to revised/updated IBM Deskstar Firmware
   [CF] Cygwin & Windows: Added missing ASPI manager initialization