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

(-)/root/smartmontools/Makefile (-1 / +1 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	smartmontools
8
PORTNAME=	smartmontools
9
PORTVERSION=	5.41
9
PORTVERSION=	5.41
10
PORTREVISION=	2
10
PORTREVISION=	3
11
CATEGORIES=	sysutils
11
CATEGORIES=	sysutils
12
MASTER_SITES=	SF
12
MASTER_SITES=	SF
13
13
(-)/root/smartmontools/files/patch-os_freebsd (+51 lines)
Line 0 Link Here
1
Index: os_freebsd.cpp
2
===================================================================
3
--- os_freebsd.cpp	(revision 3407)
4
+++ os_freebsd.cpp	(revision 3419)
5
@@ -287,12 +287,12 @@
6
       request.flags=ATA_CMD_CONTROL;
7
       break;
8
     case ata_cmd_in::data_in:  
9
-      request.flags=ATA_CMD_READ;
10
+      request.flags=ATA_CMD_READ | ATA_CMD_CONTROL;;
11
       request.data=(char *)in.buffer;
12
       request.count=in.size;
13
       break;
14
     case ata_cmd_in::data_out: 
15
-      request.flags=ATA_CMD_WRITE;
16
+      request.flags=ATA_CMD_WRITE | ATA_CMD_CONTROL;
17
       request.data=(char *)in.buffer;
18
       request.count=in.size;
19
       break;
20
@@ -405,11 +405,8 @@
21
                  request->count,
22
                  request->timeout * 1000); // timeout in seconds
23
 
24
+  ccb.ataio.cmd.flags = CAM_ATAIO_NEEDRESULT;
25
   // ata_28bit_cmd
26
-  if (request->flags == ATA_CMD_CONTROL)
27
-    ccb.ataio.cmd.flags = CAM_ATAIO_NEEDRESULT;
28
-  else
29
-    ccb.ataio.cmd.flags = 0;
30
   ccb.ataio.cmd.command = request->u.ata.command;
31
   ccb.ataio.cmd.features = request->u.ata.feature;
32
   ccb.ataio.cmd.lba_low = request->u.ata.lba;
33
@@ -435,7 +432,17 @@
34
     return -1;
35
   }
36
 
37
-  request->u.ata.count = ccb.ataio.res.sector_count;
38
+  request->u.ata.lba =
39
+    ((u_int64_t)(ccb.ataio.res.lba_low)) |
40
+    ((u_int64_t)(ccb.ataio.res.lba_mid) << 8) |
41
+    ((u_int64_t)(ccb.ataio.res.lba_high) << 16) |
42
+    ((u_int64_t)(ccb.ataio.res.lba_low_exp) << 24) |
43
+    ((u_int64_t)(ccb.ataio.res.lba_mid_exp) << 32) |
44
+    ((u_int64_t)(ccb.ataio.res.lba_high_exp) << 40);
45
+
46
+  request->u.ata.count = ccb.ataio.res.sector_count | (ccb.ataio.res.sector_count_exp << 8);
47
+  request->error = ccb.ataio.res.error;
48
+
49
   return 0;
50
 }
51
 

Return to bug 161018