diff --git a/sm5/scsiprint.c b/sm5/scsiprint.c
index e7a88dbb840a9264353e0bfbc2d67c5fbd3092d5..4e0d285cb386cf181057ad75ebaeac080245c764 100644
--- a/sm5/scsiprint.c
+++ b/sm5/scsiprint.c
@@ -40,7 +40,7 @@
 
 #define GBUF_SIZE 65535
 
-const char* scsiprint_c_cvsid="$Id: scsiprint.c,v 1.64 2003/11/18 13:47:40 dpgilbert Exp $"
+const char* scsiprint_c_cvsid="$Id: scsiprint.c,v 1.65 2003/11/18 16:53:00 ballen4705 Exp $"
 EXTERN_H_CVSID SCSICMDS_H_CVSID SCSIPRINT_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID;
 
 // control block which points to external global control variables
@@ -832,7 +832,19 @@ int scsiPrintMain(int fd)
         if (scsiSmartDisable(fd))
             failuretest(MANDATORY_CMD,returnval |= FAILSMART);
     }
-
+    
+    if (con->smartautosaveenable) {
+      if (scsiClearControlGLTSD(fd, modese_len)) {
+	pout("Enable autosave (clear GLTSD bit) failed\n");
+	failuretest(OPTIONAL_CMD,returnval |= FAILSMART);
+      }
+    }
+    
+    if (con->smartautosavedisable) {
+      // Doug, this is where we should have a corresponding disable
+      // GLTSD -- mimic structure just above, please
+    }
+    
     if (con->checksmart) {
         scsiGetSupportedLogPages(fd);
         checkedSupportedLogPages = 1;
diff --git a/sm5/scsiprint.cpp b/sm5/scsiprint.cpp
index 5e48bb64170c3268154e9bf99873dcec5c846dc4..5afcd560510e4b686f6752a862e4071ef1503739 100644
--- a/sm5/scsiprint.cpp
+++ b/sm5/scsiprint.cpp
@@ -40,7 +40,7 @@
 
 #define GBUF_SIZE 65535
 
-const char* scsiprint_c_cvsid="$Id: scsiprint.cpp,v 1.64 2003/11/18 13:47:40 dpgilbert Exp $"
+const char* scsiprint_c_cvsid="$Id: scsiprint.cpp,v 1.65 2003/11/18 16:53:00 ballen4705 Exp $"
 EXTERN_H_CVSID SCSICMDS_H_CVSID SCSIPRINT_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID;
 
 // control block which points to external global control variables
@@ -832,7 +832,19 @@ int scsiPrintMain(int fd)
         if (scsiSmartDisable(fd))
             failuretest(MANDATORY_CMD,returnval |= FAILSMART);
     }
-
+    
+    if (con->smartautosaveenable) {
+      if (scsiClearControlGLTSD(fd, modese_len)) {
+	pout("Enable autosave (clear GLTSD bit) failed\n");
+	failuretest(OPTIONAL_CMD,returnval |= FAILSMART);
+      }
+    }
+    
+    if (con->smartautosavedisable) {
+      // Doug, this is where we should have a corresponding disable
+      // GLTSD -- mimic structure just above, please
+    }
+    
     if (con->checksmart) {
         scsiGetSupportedLogPages(fd);
         checkedSupportedLogPages = 1;
diff --git a/sm5/smartd.c b/sm5/smartd.c
index b9bd4e07688b7d7859f68f78d198dbac3f2ad369..ab5f6c59c8057ea30c7f3245cec1e305a770162a 100644
--- a/sm5/smartd.c
+++ b/sm5/smartd.c
@@ -65,7 +65,7 @@
 extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *escalade_c_cvsid, 
                   *knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *utility_c_cvsid;
 
-const char *smartd_c_cvsid="$Id: smartd.c,v 1.242 2003/11/18 13:49:43 dpgilbert Exp $" 
+const char *smartd_c_cvsid="$Id: smartd.c,v 1.243 2003/11/18 16:53:00 ballen4705 Exp $" 
                             ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID KNOWNDRIVES_H_CVSID
                             SCSICMDS_H_CVSID SMARTD_H_CVSID UTILITY_H_CVSID; 
 
@@ -1105,6 +1105,19 @@ static int SCSIDeviceScan(cfgfile *cfg) {
     }
   }
   
+  // disable autosave (set GLTSD bit)
+  if (cfg->autosave==1){
+    // Doug, fill in by following the pattern immediately below
+  }
+
+  // or enable autosave (clear GLTSD bit)
+  if (cfg->autosave==2){
+    if (scsiClearControlGLTSD(fd, cfg->modese_len))
+      PrintOut(LOG_INFO,"Device: %s, could not enable autosave (clear GLTSD bit).\n",device);
+    else
+      PrintOut(LOG_INFO,"Device: %s, enabled autosave (clear GLTSD bit).\n",device);
+  }
+  
   // tell user we are registering device
   PrintOut(LOG_INFO, "Device: %s, is SMART capable. Adding to \"monitor\" list.\n", device);
   
diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp
index bb19ea9d00f830ee09747d35c2f01b3e3e92555d..3da0772547e71c76d83cf347314e03bcb7d377a0 100644
--- a/sm5/smartd.cpp
+++ b/sm5/smartd.cpp
@@ -65,7 +65,7 @@
 extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *escalade_c_cvsid, 
                   *knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *utility_c_cvsid;
 
-const char *smartd_c_cvsid="$Id: smartd.cpp,v 1.242 2003/11/18 13:49:43 dpgilbert Exp $" 
+const char *smartd_c_cvsid="$Id: smartd.cpp,v 1.243 2003/11/18 16:53:00 ballen4705 Exp $" 
                             ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID KNOWNDRIVES_H_CVSID
                             SCSICMDS_H_CVSID SMARTD_H_CVSID UTILITY_H_CVSID; 
 
@@ -1105,6 +1105,19 @@ static int SCSIDeviceScan(cfgfile *cfg) {
     }
   }
   
+  // disable autosave (set GLTSD bit)
+  if (cfg->autosave==1){
+    // Doug, fill in by following the pattern immediately below
+  }
+
+  // or enable autosave (clear GLTSD bit)
+  if (cfg->autosave==2){
+    if (scsiClearControlGLTSD(fd, cfg->modese_len))
+      PrintOut(LOG_INFO,"Device: %s, could not enable autosave (clear GLTSD bit).\n",device);
+    else
+      PrintOut(LOG_INFO,"Device: %s, enabled autosave (clear GLTSD bit).\n",device);
+  }
+  
   // tell user we are registering device
   PrintOut(LOG_INFO, "Device: %s, is SMART capable. Adding to \"monitor\" list.\n", device);