From: Collectd Packaging Team Date: Sat, 2 Jan 2021 20:09:49 +0000 (+0000) Subject: fix-smart-test X-Git-Tag: archive/raspbian/5.12.0-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1aa9592c494b8f2c1edf8ba3c3fab0a50b349a15;p=collectd.git fix-smart-test =================================================================== Gbp-Pq: Name fix-smart-test --- diff --git a/src/smart_test.c b/src/smart_test.c index f1a01e6..a6b912f 100644 --- a/src/smart_test.c +++ b/src/smart_test.c @@ -30,6 +30,8 @@ #include "smart.c" #include "testing.h" + + #define INTEL_VID 0x8086 int VENDOR_ID = INTEL_VID; @@ -46,7 +48,7 @@ int ioctl(int __fd, unsigned long int __request, ...) { if (admin_cmd->opcode == NVME_ADMIN_IDENTIFY) { // ioctl asked about vid __le16 *vid = (__le16 *)addr; - *vid = VENDOR_ID; + *vid = htole16(VENDOR_ID); return 0; } else if (admin_cmd->opcode == NVME_ADMIN_GET_LOG_PAGE) { // ioctl asked about smart attributes