Debian Codegraph @

debian/patches/fix-smart-test

raw
1 Index: collectd/src/smart_test.c
2 ===================================================================
3 --- collectd.orig/src/smart_test.c
4 +++ collectd/src/smart_test.c
5 @@ -30,6 +30,8 @@
6 #include "smart.c"
7 #include "testing.h"
8
9 +
10 +
11 #define INTEL_VID 0x8086
12
13 int VENDOR_ID = INTEL_VID;
14 @@ -46,7 +48,7 @@ int ioctl(int __fd, unsigned long int __
15 if (admin_cmd->opcode == NVME_ADMIN_IDENTIFY) {
16 // ioctl asked about vid
17 __le16 *vid = (__le16 *)addr;
18 - *vid = VENDOR_ID;
19 + *vid = htole16(VENDOR_ID);
20 return 0;
21 } else if (admin_cmd->opcode == NVME_ADMIN_GET_LOG_PAGE) {
22 // ioctl asked about smart attributes