View | Details | Raw Unified | Return to bug 141371
Collapse All | Expand All

(-)/root/tmp/smartmontools/Makefile (-2 / +3 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	smartmontools
8
PORTNAME=	smartmontools
9
PORTVERSION=	5.38
9
PORTVERSION=	5.39
10
PORTREVISION=	8
11
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
12
MASTER_SITES=	SF
11
MASTER_SITES=	SF
13
12
Lines 17-22 Link Here
17
CONFLICTS=	smartmontools-devel-[0-9]*
16
CONFLICTS=	smartmontools-devel-[0-9]*
18
17
19
USE_GMAKE=	yes
18
USE_GMAKE=	yes
19
# hack to prevent gmake failure on 6.xx
20
GMAKE=		make
20
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
21
CONFIGURE_ARGS=	--with-docdir=${DOCSDIR} --enable-sample
22
CONFIGURE_ARGS=	--with-docdir=${DOCSDIR} --enable-sample
22
23
(-)/root/tmp/smartmontools/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (smartmontools-5.38.tar.gz) = a282846532ecbd6b4a28072373b3a70b
1
MD5 (smartmontools-5.39.tar.gz) = 63c1b5373a9ef91e9c9becb16e147571
2
SHA256 (smartmontools-5.38.tar.gz) = b2097320a1fca4851f1377a14f4cc14a46e27d2a44ca017c40a6cb618b2f31e8
2
SHA256 (smartmontools-5.39.tar.gz) = e118de37541ef78061a823439425c63106df249e925610d96aabc9bd8239e0d0
3
SIZE (smartmontools-5.38.tar.gz) = 617326
3
SIZE (smartmontools-5.39.tar.gz) = 658355
(-)/root/tmp/smartmontools/files/patch-knowndrives.cpp (-11 lines)
Lines 1-11 Link Here
1
--- knowndrives.cpp.orig	2008-02-02 19:10:48.000000000 +0100
2
+++ knowndrives.cpp	2008-03-14 13:35:59.000000000 +0100
3
@@ -1155,7 +1155,7 @@
4
     NULL, NULL, NULL, NULL
5
   },
6
   { "Western Digital Caviar SE Serial ATA family",
7
-    "^WDC WD((4|8|12|16|20|25|32|40)00(JD|KD))-.*$",
8
+    "^WDC WD((4|8|12|16|20|25|32|40)00(JD|KD|PD))-.*$",
9
     ".*",
10
     NULL, NULL, NULL, NULL
11
   },
(-)/root/tmp/smartmontools/files/patch-os__freebsd.cpp (-58 lines)
Lines 1-58 Link Here
1
2
$FreeBSD: ports/sysutils/smartmontools/files/patch-os__freebsd.cpp,v 1.5 2009/08/31 13:45:57 avl Exp $
3
4
--- os_freebsd.cpp.orig
5
+++ os_freebsd.cpp
6
@@ -272,7 +272,6 @@
7
 }
8
 
9
 int highpoint_command_interface(__unused int fd, __unused smart_command_set command, __unused int select, __unused char *data) {
10
-{
11
   return -1;
12
 }
13
 
14
@@ -341,6 +340,15 @@
15
     request.count=512;
16
     copydata=1;
17
     break;
18
+  case WRITE_LOG:
19
+    memcpy(buff, data, 512);
20
+    request.u.ata.feature=ATA_SMART_WRITE_LOG_SECTOR;
21
+    request.u.ata.lba=select|(0xc24f<<8);
22
+    request.u.ata.count=1;
23
+    request.flags=ATA_CMD_WRITE;
24
+    request.data=(char *)buff;
25
+    request.count=512;
26
+    break;
27
   case IDENTIFY:
28
     request.u.ata.command=ATA_IDENTIFY_DEVICE;
29
     request.flags=ATA_CMD_READ;
30
@@ -525,7 +533,7 @@
31
     return -1;
32
   }
33
 
34
-  if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
35
+  if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) {
36
  #if __FreeBSD_version > 500000
37
     cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr);
38
  #endif
39
@@ -924,6 +932,7 @@
40
 static const char * fbsd_dev_prefix = "/dev/";
41
 static const char * fbsd_dev_ata_disk_prefix = "ad";
42
 static const char * fbsd_dev_scsi_disk_plus = "da";
43
+static const char * fbsd_dev_scsi_pass = "pass";
44
 static const char * fbsd_dev_scsi_tape1 = "sa";
45
 static const char * fbsd_dev_scsi_tape2 = "nsa";
46
 static const char * fbsd_dev_scsi_tape3 = "esa";
47
@@ -960,6 +969,11 @@
48
     return CONTROLLER_ATA;
49
   }
50
   
51
+  // form /dev/pass* or pass*
52
+  if (!strncmp(fbsd_dev_scsi_pass, dev_name,
53
+               strlen(fbsd_dev_scsi_pass)))
54
+    goto handlescsi;
55
+
56
   // form /dev/da* or da*
57
   if (!strncmp(fbsd_dev_scsi_disk_plus, dev_name,
58
                strlen(fbsd_dev_scsi_disk_plus)))
(-)/root/tmp/smartmontools/files/patch-scsiata.cpp (-22 lines)
Lines 1-22 Link Here
1
--- scsiata.cpp.orig	2007-12-02 19:14:20.000000000 -0700
2
+++ scsiata.cpp	2009-09-04 14:27:48.000000000 -0600
3
@@ -380,14 +380,14 @@
4
    return 1, else 0 */
5
 int has_sat_pass_through(int device, int packet_interface)
6
 {
7
-    char data[512];
8
+    int ret;
9
+    char *data = (char *)malloc(512);	// (alignment)
10
     smart_command_set command;
11
 
12
     command = packet_interface ? PIDENTIFY : IDENTIFY;
13
-    if (0 == sat_command_interface(device, command, 0, data))
14
-        return 1;
15
-    else
16
-        return 0;
17
+    ret = ( 0 == sat_command_interface(device, command, 0, data) ? 1 : 0 );
18
+    free(data);
19
+    return ret;
20
 }
21
 
22
 /* Next two functions are borrowed from sg_lib.c in the sg3_utils

Return to bug 141371