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 |