fix-smart-test
authorCollectd Packaging Team <team+collectd@tracker.debian.org>
Tue, 22 Feb 2022 00:17:43 +0000 (00:17 +0000)
committerBernd Zeimetz <bzed@debian.org>
Tue, 22 Feb 2022 00:17:43 +0000 (00:17 +0000)
===================================================================

Gbp-Pq: Name fix-smart-test

src/smart_test.c

index f1a01e639a4480755072d164baed53dc8b30da9e..a6b912faba8c66ff47dfa97ecc8e8948787c45ed 100644 (file)
@@ -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