Debian Bug report logs - #121161
smartsuite: please add option to avoid scan of certain devices

version graph

Package: smartsuite; Maintainer for smartsuite is (unknown);

Reported by: Henrique de Moraes Holschuh <hmh@debian.org>

Date: Mon, 26 Nov 2001 01:18:03 UTC

Severity: wishlist

Found in version 2.1-1

Done: Martin Michlmayr <tbm@cyrius.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Christopher L Cheney <ccheney@debian.org>:
Bug#121161; Package smartsuite. Full text and rfc822 format available.

Acknowledgement sent to Henrique de Moraes Holschuh <hmh@debian.org>:
New Bug report received and forwarded. Copy sent to Christopher L Cheney <ccheney@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Henrique de Moraes Holschuh <hmh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: smartsuite: please add option to avoid scan of certain devices
Date: Sun, 25 Nov 2001 23:12:14 -0200
Package: smartsuite
Version: 2.1-1
Severity: wishlist

It would be nice to be able to tell smard to NOT scan certain devices (or to
scan certain devices). I have had cases where a (insert very big expletive
here) ATAPI device that would hang badly when probed by smartd for SMART
ability.

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux khazad-dum 2.2.20 #1 Fri Nov 23 21:39:05 BRST 2001 i686
Locale: LANG=pt_BR, LC_CTYPE=pt_BR

Versions of packages smartsuite depends on:
ii  libc6                         2.2.4-6    GNU C Library: Shared libraries an

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Information forwarded to debian-bugs-dist@lists.debian.org, Christopher L Cheney <ccheney@debian.org>:
Bug#121161; Package smartsuite. Full text and rfc822 format available.

Acknowledgement sent to undefined <undefined@engineer.com>:
Extra info received and forwarded to list. Copy sent to Christopher L Cheney <ccheney@debian.org>. Full text and rfc822 format available.

Message #10 received at 121161@bugs.debian.org (full text, mbox):

From: undefined <undefined@engineer.com>
To: 121161@bugs.debian.org
Cc: Henrique de Moraes Holschuh <hmh@debian.org>
Subject: Re: smartsuite: please add option to avoid scan of certain devices
Date: 07 Jan 2002 01:55:14 -0600
as this is an option that i would also like to see added, i took the
initiative to "forward" the request to the upstream package's feature
request page
<http://sourceforge.net/tracker/?func=detail&aid=500291&group_id=4299&atid=354299>.

to make the task easy for both upstream author and debian developer, may
i suggest that the upstream author add the ability to turn autoprobing
on/off and specify devices on the smartd command-line (ex "smartd
--autoprobe" and "smartd /dev/hda /dev/hdb") and then the debian
developer in the init script (ex /etc/init.d/smartd) could include the
config file (ex /etc/default/smartd) which would contain shell variables
for autoprobing on/off and what devices to probe.

that way the upstream author only has to add command-line parsing (and
not file i/o as i like the simplicity of uscs-smartsuite 2.0; sorry,
haven't inspected the latest version) to smartd and the command-line
options can be assembled by the debian developer from within an init
script and config file combo.

DISCLAIMERS: sorry if any of the above mentioned files are
misnamed/mislocated; i'm not familiar with the specifics of debian
policy.  sorry if this is a really stupid idea and i would have seen it
as such if i would have spent only 5 minutes looking at the latest
version (upstream or debian package).  my suggestion is merely based on
my experience with 2.0Beta2-1 and the fact that with the latest debian
package somebody still desires the feature.




Information forwarded to debian-bugs-dist@lists.debian.org, Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org:
Bug#121161; Package smartsuite. Full text and rfc822 format available.

Acknowledgement sent to Soeren Sonnenburg <sonnenburg@informatik.hu-berlin.de>:
Extra info received and forwarded to list. Copy sent to Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org. Full text and rfc822 format available.

Message #15 received at 121161@bugs.debian.org (full text, mbox):

From: Soeren Sonnenburg <sonnenburg@informatik.hu-berlin.de>
To: Debian Bug Tracking System <121161@bugs.debian.org>
Cc: sonnenburg@informatik.hu-berlin.de
Subject: smartsuite: patch for problem
Date: Sat, 02 Feb 2002 18:35:01 +0100
Package: smartsuite
Version: 2.1-1


-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux fortknox 2.4.17 #5 Wed Jan 16 18:57:30 CET 2002 i586
Locale: LANG=C, LC_CTYPE=de_DE

Versions of packages smartsuite depends on:
ii  libc6                         2.2.4-7    GNU C Library: Shared libraries an


--- t/smartsuite-2.1/smartd.c	Sat Feb  2 17:33:36 2002
+++ smartsuite-2.1/smartd.c	Sat Feb  2 18:15:41 2002
@@ -22,12 +22,18 @@
 #include <string.h>
 #include <linux/hdreg.h>
 #include <syslog.h>
+#include <ctype.h>
 
 #include "atacmds.h"
 #include "scsicmds.h"
 #include "smartd.h"
 
 
+char pruneidedisks[256];
+int nrpruneidedisks=0;
+char prunescsidisks[256];
+int nrprunescsidisks=0;
+
 int daemon_init(void)
 {
    pid_t pid;
@@ -60,32 +66,63 @@
 	Takes command options and sets features to be run */	
 void ParseOpts ( char *opts)
 {
-   int i = 0;
-   char options[255];
-	
-   strcpy ( (char *) &options, opts);
+		int i = 0;
+		char options[255];
+
+		strcpy ( (char *) &options, opts);
 
-   if ( options[0] != '-' )
-   {
-      Usage();
-      exit (-1);
-   }
-
-   for (i = 1; options[i] != '\0'; i++ )
-   {
-      switch (options[i])
-      {
-         case DEBUGMODE :
-            debugmode  = TRUE;
-            break;
-         case EMAILNOTIFICATION:
-            emailnotification = TRUE;
-            break;
-         default:
-            Usage();
-            exit (-1);	
-      }
-   }
+		/* if (debug)
+			printf("Processing argument: \"%s\"\n:", opts); */
+
+		if ( options[0] != '-' )
+		{
+				Usage();
+				exit (-1);
+		}
+
+		for (i = 1; options[i] != '\0'; i++ )
+		{
+				switch (options[i])
+				{
+						case DEBUGMODE :
+								debugmode  = TRUE;
+								break;
+						case EMAILNOTIFICATION:
+								emailnotification = TRUE;
+								break;
+						case IGNOREIDE:
+								i++;
+								
+								while (options[i])
+								{
+									char c=tolower(options[i]);
+									if (c >= 'a' && c <= 'z')
+									{
+										pruneidedisks[nrpruneidedisks++]=c;
+									}
+									i++;
+								}
+								break;
+						case IGNORESCSI:
+								i++;
+								
+								while (options[i])
+								{
+									char c=tolower(options[i]);
+									if (c >= 'a' && c <= 'z')
+									{
+										prunescsidisks[nrprunescsidisks++]=c;
+									}
+									i++;
+								}
+								break;
+						default:
+								Usage();
+								exit (-1);	
+				}
+				
+				while (options[i] && isspace(options[i]) && options[i]!='-') { i++; }
+		}
 }
 
 void failurenotify ( char *message)
@@ -96,137 +133,158 @@
 
 void atadevicescan ( atadevices_t *devices)
 {
+	int skipdev=0;
+	int i;
+	int fd;
+	struct hd_driveid drive;
+	char device[] = "/dev/hda";
 
-   int i;
-   int fd;
-   struct hd_driveid drive;
-   char device[] = "/dev/hda";
-	
-   for(i = 0; i < MAXATADEVICES ; i++,device[7]++ )
-   {
-      fd = 0;
+	for(i = 0; i < MAXATADEVICES ; i++,device[7]++ )
+	{
+		if (skipdev<nrpruneidedisks && pruneidedisks[skipdev]==device[7])
+		{
+			if (debugmode)
+				printf("Skipping Device %s\n", device);
+			skipdev++;
+		}
+		else
 
-      if (debugmode)
-         printf("Reading Device %s\n", device);
-	
-      fd = open ( device , O_RDWR );
+		{
+			fd = 0;
 
-      if ( fd >= 0)
-      {
-         if (ataReadHDIdentity ( fd, &drive) == 0 ) 
-         {
-             if (ataSmartSupport (drive) ) 
-             {
-                if (ataEnableSmart)
-                {
-                    devices[numatadevices].fd = fd;
-                    strcpy((char *) &devices[numatadevices].devicename,
-                           (char*) &device);
-                    devices[numatadevices].drive = drive;
-                    if ( ataReadSmartValues ( fd, 
-                         &devices[numatadevices].smartval) != 0 )
-                    {
-                        syslog (LOG_INFO, 
-                                "Device: %s, Read Smart Values Failed\n", 
-                                device);
-                    }
-
-                    if ( ataReadSmartThresholds ( fd, 
-                         &devices[numatadevices].smartthres) != 0 )
-                    {
-                        syslog (LOG_INFO, 
-                                "Device: %s, Read Smart Thresholds Failed\n", 
-                                device);
-                    }
-
-                    if (debugmode)
-                        printf("%s Found and is SMART capable\n", 
-                               devices[numatadevices].devicename);
-
-                    syslog (LOG_INFO, 
-                            "Device: %s, Found and is SMART capable\n", 
-                            device);
-                    devices[numatadevices].selftest = 
-                        isSupportSelfTest(devices[numatadevices].smartval);
-                    numatadevices++;
-               }      
-            }
-         }
-      }
-   }
+			if (debugmode)
+				printf("Reading Device %s\n", device);
+
+			fd = open ( device , O_RDWR );
+
+			if ( fd >= 0)
+			{
+				if (ataReadHDIdentity ( fd, &drive) == 0 ) 
+				{
+					if (ataSmartSupport (drive) ) 
+					{
+						if (ataEnableSmart)
+						{
+							devices[numatadevices].fd = fd;
+							strcpy((char *) &devices[numatadevices].devicename,
+									(char*) &device);
+							devices[numatadevices].drive = drive;
+							if ( ataReadSmartValues ( fd, 
+										&devices[numatadevices].smartval) != 0 )
+							{
+								syslog (LOG_INFO, 
+										"Device: %s, Read Smart Values Failed\n", 
+										device);
+							}
+
+							if ( ataReadSmartThresholds ( fd, 
+										&devices[numatadevices].smartthres) != 0 )
+							{
+								syslog (LOG_INFO, 
+										"Device: %s, Read Smart Thresholds Failed\n", 
+										device);
+							}
+
+							if (debugmode)
+								printf("%s Found and is SMART capable\n", 
+										devices[numatadevices].devicename);
+
+							syslog (LOG_INFO, 
+									"Device: %s, Found and is SMART capable\n", 
+									device);
+							devices[numatadevices].selftest = 
+								isSupportSelfTest(devices[numatadevices].smartval);
+							numatadevices++;
+						}      
+					}
+				}
+			}
+		}
+	}
 }
 
 
 void scsidevicescan ( scsidevices_t *devices)
 {
-   int i, fd, smartsupport;
-   unsigned char  tBuf[4096];
-   char device[] = "/dev/sda";
-	
+	int skipdev=0;
+	int i, fd, smartsupport;
+	unsigned char  tBuf[4096];
+	char device[] = "/dev/sda";
 
-   for(i = 0; i < MAXSCSIDEVICES ; i++,device[7]++ )
-   {
-      fd = 0;
-
-      if (debugmode)
-         printf("Reading Device %s\n", device);
-
-      fd = open ( device , O_RDWR );
-
-      if(debugmode)
-         printf ("Device: %s, File Descriptor: %d \n", device, fd);
-
-      if ( fd >= 0)
-      {
-         if (  testunitready (fd) == 0 ) 
-         {
-            if (modesense ( fd, 0x1c, (UINT8 *) &tBuf) != 0)
-            {
-               if(debugmode)
-                   printf ("Device: %s, Failed read of ModePage 1C \n", device);
-            }
-            else
-            {
-            if ( scsiSmartSupport( fd, (UINT8 *) &smartsupport) == 0)
-            {			
-               if (!(smartsupport & DEXCPT_ENABLE))
-               {
-                  devices[numscsidevices].fd = fd;
-                  strcpy((char *) &devices[numscsidevices].devicename,
-                         (char*) &device);
-							
-                  if (debugmode)
-                    printf("%s Found and is SMART capable\n", 
-                            devices[numscsidevices].devicename);
-                 
-                  syslog (LOG_INFO, "Device: %s, Found and is SMART capable\n",
-                           device);
-                 
-                  if (logsense ( fd , SUPPORT_LOG_PAGES, (UINT8 *) &tBuf) == 0)
-                  {
-                     for ( i = 4; i < tBuf[3] + LOGPAGEHDRSIZE ; i++)
-                     {
-                        switch ( tBuf[i])
-                        { 
-                            case TEMPERATURE_PAGE:
-                               devices[numscsidevices].TempPageSupported = 1;
-                               break;
-                            case SMART_PAGE:
-                               devices[numscsidevices].SmartPageSupported = 1;
-                               break;
-                            default:
-                               break;
-                        }
-                     }	
-                  }
-                  
-                  numscsidevices++;
-             }
-         }
-      }
-   }
-   }
-}
+
+	for(i = 0; i < MAXSCSIDEVICES ; i++,device[7]++ )
+	{
+		if (skipdev<nrprunescsidisks && prunescsidisks[skipdev]==device[7])
+		{
+			if (debugmode)
+				printf("Skipping Device %s\n", device);
+			skipdev++;
+		}
+		else
+		{
+
+			fd = 0;
+
+			if (debugmode)
+				printf("Reading Device %s\n", device);
+
+			fd = open ( device , O_RDWR );
+
+			if(debugmode)
+				printf ("Device: %s, File Descriptor: %d \n", device, fd);
+
+			if ( fd >= 0)
+			{
+				if (  testunitready (fd) == 0 ) 
+				{
+					if (modesense ( fd, 0x1c, (UINT8 *) &tBuf) != 0)
+					{
+						if(debugmode)
+							printf ("Device: %s, Failed read of ModePage 1C \n", device);
+					}
+					else
+					{
+						if ( scsiSmartSupport( fd, (UINT8 *) &smartsupport) == 0)
+						{			
+							if (!(smartsupport & DEXCPT_ENABLE))
+							{
+								devices[numscsidevices].fd = fd;
+								strcpy((char *) &devices[numscsidevices].devicename,
+										(char*) &device);
+
+								if (debugmode)
+									printf("%s Found and is SMART capable\n", 
+											devices[numscsidevices].devicename);
+
+								syslog (LOG_INFO, "Device: %s, Found and is SMART capable\n",
+										device);
+
+								if (logsense ( fd , SUPPORT_LOG_PAGES, (UINT8 *) &tBuf) == 0)
+								{
+									for ( i = 4; i < tBuf[3] + LOGPAGEHDRSIZE ; i++)
+									{
+										switch ( tBuf[i])
+										{ 
+											case TEMPERATURE_PAGE:
+												devices[numscsidevices].TempPageSupported = 1;
+												break;
+											case SMART_PAGE:
+												devices[numscsidevices].SmartPageSupported = 1;
+												break;
+											default:
+												break;
+										}
+									}	
+								}
+
+								numscsidevices++;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
 }
 
 
@@ -367,9 +425,9 @@
 
 /* Main Program */
 
-int main (int argv, char **argc)
+int main (int argc, char **argv)
 {
-	
+	int i;	
 
 	atadevices_t atadevices[MAXATADEVICES], *atadevicesptr;
 	scsidevices_t scsidevices[MAXSCSIDEVICES], *scsidevicesptr;
@@ -380,8 +438,12 @@
 	scsidevicesptr = scsidevices;
 	atadevicesptr = atadevices;
 
-	if ( *(argc+1) != NULL)
-		ParseOpts ( *(argc+1));
+	for (i=1; i<argc; i++)
+	{
+		if ( argv[i] != NULL)
+			ParseOpts ( argv[i]);
+	}
+
 	syslog (LOG_INFO, "smartd started\n");
 	if (!debugmode)
 	{
--- t/smartsuite-2.1/smartd.h	Wed Sep 13 09:00:00 2000
+++ smartsuite-2.1/smartd.h	Sat Feb  2 18:11:12 2002
@@ -20,6 +20,8 @@
 /* Defines for command line options */ 
 #define DEBUGMODE 		'X'
 #define EMAILNOTIFICATION	'e'
+#define IGNOREIDE 		'i'
+#define IGNORESCSI		's'
 
 /* Boolean Values */
 #define TRUE 0x01
--- t/smartsuite-2.1/debian/smartsuite.init	Sat Feb  2 17:33:36 2002
+++ smartsuite-2.1/debian/smartsuite.init	Sat Feb  2 18:30:04 2002
@@ -16,6 +16,11 @@
 NAME=smartd
 DESC="disk monitoring daemon"
 
+# uncomment the drive names to ignore -i denotes ide drives to ignore
+# -s scsi drives to ignore
+
+#OPTIONS='-iabcdefghijklmnopqrstuvwxyz -sabcdefghijklmnopqrstuvwxyz'
+
 test -f $DAEMON || exit 0
 
 set -e
@@ -23,7 +28,7 @@
 case "$1" in
   start)
 	echo -n "Starting $DESC: "
-	start-stop-daemon --start --quiet --exec $DAEMON
+	start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
 	echo "$NAME."
 	;;
   stop)
@@ -51,7 +56,7 @@
 	#
 	echo -n "Restarting $DESC: "
 	start-stop-daemon --stop --quiet --pidfile \
-		/var/run/$NAME.pid --exec $DAEMON
+		/var/run/$NAME.pid --exec $DAEMON -- $OPTIONS
 	sleep 1
 	start-stop-daemon --start --quiet --pidfile \
 		/var/run/$NAME.pid --exec $DAEMON




Information forwarded to debian-bugs-dist@lists.debian.org, Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org:
Bug#121161; Package smartsuite. Full text and rfc822 format available.

Acknowledgement sent to Chris Cheney <ccheney@cheney.cx>:
Extra info received and forwarded to list. Copy sent to Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org. Full text and rfc822 format available.

Message #20 received at 121161@bugs.debian.org (full text, mbox):

From: Chris Cheney <ccheney@cheney.cx>
To: Soeren Sonnenburg <sonnenburg@informatik.hu-berlin.de>, 121161@bugs.debian.org
Subject: Re: Bug#121161: smartsuite: patch for problem
Date: Sat, 2 Feb 2002 13:13:01 -0600
tags 121161 + patch

stop

Soeren,

Thanks for the patch, have you sent this to upstream yet?  If not I will
forward it to upstream so they can get the benefit of your hard work as
well.

Thanks!

Chris Cheney



Information forwarded to debian-bugs-dist@lists.debian.org, Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org:
Bug#121161; Package smartsuite. Full text and rfc822 format available.

Acknowledgement sent to Soeren Sonnenburg <sonnenburg@informatik.hu-berlin.de>:
Extra info received and forwarded to list. Copy sent to Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org. Full text and rfc822 format available.

Message #25 received at 121161@bugs.debian.org (full text, mbox):

From: Soeren Sonnenburg <sonnenburg@informatik.hu-berlin.de>
To: Chris Cheney <ccheney@cheney.cx>
Cc: 121161@bugs.debian.org
Subject: Re: Bug#121161: smartsuite: patch for problem
Date: 02 Feb 2002 20:27:52 +0100
On Sat, 2002-02-02 at 20:13, Chris Cheney wrote:
> tags 121161 + patch
> 
> stop
> 
> Soeren,
> 
> Thanks for the patch, have you sent this to upstream yet?  If not I will
> forward it to upstream so they can get the benefit of your hard work as
> well.
> 
> Thanks!
> 
> Chris Cheney

No I did not.

Anyway it was no hard work. I just needed this to keep one of my hard
disk sleeping well.

Regards.
S.




Information forwarded to debian-bugs-dist@lists.debian.org, Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org:
Bug#121161; Package smartsuite. Full text and rfc822 format available.

Acknowledgement sent to Jason Lunz <lunz-debian@falooley.org>:
Extra info received and forwarded to list. Copy sent to Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org. Full text and rfc822 format available.

Message #30 received at 121161@bugs.debian.org (full text, mbox):

From: Jason Lunz <lunz-debian@falooley.org>
To: Debian Bug Tracking System <121161@bugs.debian.org>
Subject: smartsuite: a patch to do device selection
Date: Sat, 15 Jun 2002 09:29:23 -0400
Package: smartsuite
Version: 2.1-1
Followup-For: Bug #121161


I just threw this together. It allows you to select which scsi and ata
devices to scan using -a and -s. For example, -a acd would scan
/dev/hd[acd]. If you use neither -a nor -s, the default is to behave as
before.

Jason



diff -ur smartsuite-2.1/smartd.c smartsuite-2.1-jl/smartd.c
--- smartsuite-2.1/smartd.c	Sat Jun 15 09:12:59 2002
+++ smartsuite-2.1-jl/smartd.c	Sat Jun 15 09:22:10 2002
@@ -27,6 +27,18 @@
 #include "scsicmds.h"
 #include "smartd.h"
 
+/* Global Variables for command line options */
+unsigned char debugmode               = FALSE;
+
+int numatadevices;
+int numscsidevices;
+
+/* Devices to scan */
+static const char *Atadevices = "abcdefghijkl";
+static const char *Scsidevices = "abcdefghijkl";
+
+/* how often SMART is checks in seconds */
+static const int Checktime = 1800;
 
 int daemon_init(void)
 {
@@ -49,43 +61,37 @@
 
 void Usage ( void)
 {
-   printf( "smartd version %i.%i - S.M.A.R.T. Daemon\n", 
-           VERSION_MAJOR, VERSION_MINOR);
-   printf( "useage: smartd -[opts] \n");
-   printf( "Read Only Commands:\n");
-   printf( "\t\t%c\t\tStart smartd in debug Mode\n",DEBUGMODE);
-}
-	
-/*  void ParseOpts ( chars *opts) 
-	Takes command options and sets features to be run */	
-void ParseOpts ( char *opts)
-{
-   int i = 0;
-   char options[255];
-	
-   strcpy ( (char *) &options, opts);
-
-   if ( options[0] != '-' )
-   {
-      Usage();
-      exit (-1);
-   }
-
-   for (i = 1; options[i] != '\0'; i++ )
-   {
-      switch (options[i])
-      {
-         case DEBUGMODE :
-            debugmode  = TRUE;
-            break;
-         case EMAILNOTIFICATION:
-            emailnotification = TRUE;
-            break;
-         default:
-            Usage();
-            exit (-1);	
-      }
-   }
+   printf( "smartd version %i.%i - S.M.A.R.T. Daemon\n", VERSION_MAJOR, VERSION_MINOR);
+   printf( "usage: smartd [options]\n"
+	"\t-d\tStart smartd in debug Mode\n"
+	"\t-a\tWhich ATA devices to monitor: ac -> /dev/hda, /dev/hdc\n"
+	"\t-s\tWhich SCSI devices to monitor\n"
+	);
+}
+	
+/*  Takes command options and sets features to be run */	
+void ParseOpts(int argc, char **argv)
+{
+	for(;;) {
+		switch(getopt(argc, argv, "dXa:s:")) {
+			case -1:
+				return;
+			case '?':
+			default:
+				Usage();
+				exit(EXIT_FAILURE);
+			case 'd':
+			case 'X':
+				debugmode = TRUE;
+				break;
+			case 'a':
+				Atadevices = optarg;
+				break;
+			case 's':
+				Scsidevices = optarg;
+				break;
+		}
+	}
 }
 
 void failurenotify ( char *message)
@@ -96,16 +102,15 @@
 
 void atadevicescan ( atadevices_t *devices)
 {
-
-   int i;
    int fd;
    struct hd_driveid drive;
-   char device[] = "/dev/hda";
+   char device[] = "/dev/hdX";
+   const char *cp;
 	
-   for(i = 0; i < MAXATADEVICES ; i++,device[7]++ )
-   {
+   for(cp = Atadevices; '\0' != *cp; cp++) {
       fd = 0;
 
+      device[sizeof(device)-2] = *cp;
       if (debugmode)
          printf("Reading Device %s\n", device);
 	
@@ -162,12 +167,12 @@
    int i, fd, smartsupport;
    unsigned char  tBuf[4096];
    char device[] = "/dev/sda";
+   const char *cp;
 	
-
-   for(i = 0; i < MAXSCSIDEVICES ; i++,device[7]++ )
-   {
+   for(cp = Scsidevices; '\0' != *cp; cp++) {
       fd = 0;
 
+      device[sizeof(device)-2] = *cp;
       if (debugmode)
          printf("Reading Device %s\n", device);
 
@@ -359,7 +362,7 @@
 		}
 		
 		
-		sleep ( checktime );
+		sleep ( Checktime );
 	}
 }
 
@@ -367,7 +370,7 @@
 
 /* Main Program */
 
-int main (int argv, char **argc)
+int main (int argc, char **argv)
 {
 	
 
@@ -380,8 +383,7 @@
 	scsidevicesptr = scsidevices;
 	atadevicesptr = atadevices;
 
-	if ( *(argc+1) != NULL)
-		ParseOpts ( *(argc+1));
+	ParseOpts(argc, argv);
 	syslog (LOG_INFO, "smartd started\n");
 	if (!debugmode)
 	{
diff -ur smartsuite-2.1/smartd.h smartsuite-2.1-jl/smartd.h
--- smartsuite-2.1/smartd.h	Wed Sep 13 03:00:00 2000
+++ smartsuite-2.1-jl/smartd.h	Sat Jun 15 09:00:35 2002
@@ -17,28 +17,12 @@
 #define VERSION_MAJOR 2
 #define VERSION_MINOR 1
 
-/* Defines for command line options */ 
-#define DEBUGMODE 		'X'
-#define EMAILNOTIFICATION	'e'
-
 /* Boolean Values */
 #define TRUE 0x01
 #define FALSE 0x00
 
 #define MAXATADEVICES	12
 #define MAXSCSIDEVICES	26
-
-/* Global Variables for command line options */
-unsigned char debugmode               = FALSE;
-unsigned char emailnotification       = FALSE;
-
-/* Number of ata device to scan */
-int numatadevices;
-int numscsidevices;
-
-
-/* how often SMART is checks in seconds */
-int checktime = 1800;
 
 typedef struct atadevices_s {
 	int fd;



-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux orr 2.4.18-rc4 #1 Fri May 3 20:58:08 EDT 2002 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages smartsuite depends on:
ii  libc6                         2.2.5-6    GNU C Library: Shared libraries an




Information forwarded to debian-bugs-dist@lists.debian.org, Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org:
Bug#121161; Package smartsuite. Full text and rfc822 format available.

Acknowledgement sent to ballen@gravity.phys.uwm.edu:
Extra info received and forwarded to list. Copy sent to Christopher L Cheney <ccheney@debian.org>, smartsuite@packages.qa.debian.org. Full text and rfc822 format available.

Message #35 received at 121161@bugs.debian.org (full text, mbox):

From: Bruce Allen <ballen@aei-potsdam.mpg.de>
To: 121161@bugs.debian.org
Subject: can turn off device scanning in smartmontools
Date: Thu, 14 Nov 2002 10:55:01 +0100
The smartd daemon in the smartmontools package:

http://smartmontools.sourceforge.net/

allows control over which devices are monitored, using a file 
/etc/smartd.conf

In this way, you can avoid any device scanning whatsoever, and enable 
monitoring only of selected devices.




Reply sent to Martin Michlmayr <tbm@cyrius.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Henrique de Moraes Holschuh <hmh@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #40 received at 121161-done@bugs.debian.org (full text, mbox):

From: Martin Michlmayr <tbm@cyrius.com>
To: 87613-done@bugs.debian.org, 88579-done@bugs.debian.org, 88652-done@bugs.debian.org, 89199-done@bugs.debian.org, 121161-done@bugs.debian.org, 121212-done@bugs.debian.org, 122986-done@bugs.debian.org, 137923-done@bugs.debian.org, 143183-done@bugs.debian.org, 145832-done@bugs.debian.org, 147267-done@bugs.debian.org, 166678-done@bugs.debian.org, 172875-done@bugs.debian.org, 178016-done@bugs.debian.org, 181772-done@bugs.debian.org
Subject: Removed from Debian
Date: Tue, 8 Apr 2003 23:54:07 +1000
The smartsuite package has been removed from Debian unstable.  It is
no longer maintained upstream and has been superseded by
smartmontools.  Please switch to smartmontools.  If your bug is
present in smartmontools as well, let me know.

-- 
Martin Michlmayr
tbm@cyrius.com



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 02:09:54 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.