summaryrefslogtreecommitdiff
path: root/sysutils/smartmontools/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/smartmontools/patches/patch-ac')
-rw-r--r--sysutils/smartmontools/patches/patch-ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/sysutils/smartmontools/patches/patch-ac b/sysutils/smartmontools/patches/patch-ac
new file mode 100644
index 00000000000..f2d7966fcf0
--- /dev/null
+++ b/sysutils/smartmontools/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1 2005/09/07 07:32:10 martin Exp $
+
+--- atacmds.c.orig 2004-06-03 05:47:06.000000000 +0200
++++ atacmds.c 2005-08-10 22:18:14.000000000 +0200
+@@ -673,7 +673,9 @@ int ataReadHDIdentity (int device, struc
+ }
+ }
+
++#ifndef __NetBSD__
+ // if machine is big-endian, swap byte order as needed
++ // (the NetBSD kernel does deliver the results in host byte order)
+ if (isbigendian()){
+ int i;
+
+@@ -682,6 +684,7 @@ int ataReadHDIdentity (int device, struc
+ for (i=80; i<=87; i++)
+ swap2((char *)(rawshort+i));
+ }
++#endif
+
+ // If there is a checksum there, validate it
+ if ((rawshort[255] & 0x00ff) == 0x00a5 && checksum(rawbyte))