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

(-)/home/huntting/src/Copan/smartmontools/Makefile (-1 / +1 lines)
Lines 25-31 Link Here
25
MAN5=		smartd.conf.5
25
MAN5=		smartd.conf.5
26
MAN8=		smartd.8 smartctl.8
26
MAN8=		smartd.8 smartctl.8
27
27
28
CFLAGS:=	${CFLAGS:S/-O2/-O/}
28
CFLAGS:=	${CFLAGS:S/-O2/-O/} -Wno-write-strings
29
29
30
post-patch:
30
post-patch:
31
	@${REINPLACE_CMD} -e 's| install-initdDATA | |' ${WRKSRC}/Makefile.in
31
	@${REINPLACE_CMD} -e 's| install-initdDATA | |' ${WRKSRC}/Makefile.in
(-)/home/huntting/src/Copan/smartmontools/files/patch-scsiata.cpp (+22 lines)
Line 0 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 138540