Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Mar 2007 19:34:36 +0400 (MSD)
From:      Dmitry Morozovsky <marck@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        pav@FreeBSD.org
Subject:   ports/110806: sysutils/smartmontools does not detect drives on modern MBs [patch]
Message-ID:  <200703251534.l2PFYaPB092982@woozle.rinet.ru>
Resent-Message-ID: <200703251600.l2PG0B15080800@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         110806
>Category:       ports
>Synopsis:       sysutils/smartmontools does not detect drives on modern MBs [patch]
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 25 16:00:11 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Morozovsky
>Release:        FreeBSD 6-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD 6-STABLE 


>Description:

Smartmontools' smartd does not detect drives if the first drive has two-digit
number (e.g, ad10).

>How-To-Repeat:

On modern motherboards with P965 and similar chipsets, first SATA controller
is enumerated as ata5, hence its drive got marked as ata10. smartd refuses to
start it this situation.

Also, WD Caviar SE xxxPD drives are added, according to my drive and
http://www.concordiagraphics.it/prodotti/pdf/wdsata.pdf


>Fix:



Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/smartmontools/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile	3 Mar 2007 13:05:41 -0000	1.27
+++ Makefile	25 Mar 2007 15:30:06 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	smartmontools
 PORTVERSION=	5.37
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
Index: files/patch-knowndrives.cpp
===================================================================
RCS file: files/patch-knowndrives.cpp
diff -N files/patch-knowndrives.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-knowndrives.cpp	25 Mar 2007 15:30:06 -0000
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- knowndrives.cpp.orig
++++ knowndrives.cpp
+@@ -1031,7 +1031,7 @@
+     NULL, NULL, NULL, NULL
+   },
+   { "Western Digital Caviar SE (Serial ATA) family",
+-    "^WDC WD((4|8|12|16|20|25|32)00JD|(12|16|20|25|30|32)00JS|1600AAJS)-.*$",
++    "^WDC WD((4|8|12|16|20|25|32)00[JP]D|(12|16|20|25|30|32)00JS|1600AAJS)-.*$",
+     ".*",
+     NULL, NULL, NULL, NULL
+   },
Index: files/patch-os__freebsd.cpp
===================================================================
RCS file: files/patch-os__freebsd.cpp
diff -N files/patch-os__freebsd.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-os__freebsd.cpp	25 Mar 2007 15:30:06 -0000
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- os_freebsd.cpp.orig
++++ os_freebsd.cpp
+@@ -1008,7 +1008,7 @@
+   // to first list. Turn on NOCHECK for second call. This results in no
+   // error if no more matches found, however it does append the actual
+   // pattern to the list of paths....
+-  if ((retglob=glob(pattern1, GLOB_ERR, NULL, &globbuf)) ||
++  if ((retglob=glob(pattern1, GLOB_ERR|GLOB_NOCHECK, NULL, &globbuf)) ||
+       (retglob=glob(pattern2, GLOB_ERR|GLOB_APPEND|GLOB_NOCHECK,NULL,&globbuf))) {
+      int retval = -1;
+     // glob failed
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703251534.l2PFYaPB092982>