summaryrefslogtreecommitdiffstats
path: root/abs/core/libatasmart/0001-Dont-test-undefined-bits.patch
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2016-01-28 22:24:06 (GMT)
committerBritney Fransen <brfransen@gmail.com>2016-01-28 22:24:06 (GMT)
commit56a3a6b21c534b4ede87f14f01b67e58ca645a6b (patch)
tree0a3f8091379cac6d21c47c7ee9b50f77c0be1eaa /abs/core/libatasmart/0001-Dont-test-undefined-bits.patch
parentaabf8dad99ceae0d0f58d8cc43f88e0198f97ce8 (diff)
downloadlinhes_pkgbuild-56a3a6b21c534b4ede87f14f01b67e58ca645a6b.zip
linhes_pkgbuild-56a3a6b21c534b4ede87f14f01b67e58ca645a6b.tar.gz
linhes_pkgbuild-56a3a6b21c534b4ede87f14f01b67e58ca645a6b.tar.bz2
libatasmart: update to 0.19-3
Diffstat (limited to 'abs/core/libatasmart/0001-Dont-test-undefined-bits.patch')
-rw-r--r--abs/core/libatasmart/0001-Dont-test-undefined-bits.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/abs/core/libatasmart/0001-Dont-test-undefined-bits.patch b/abs/core/libatasmart/0001-Dont-test-undefined-bits.patch
new file mode 100644
index 0000000..9b32bba
--- /dev/null
+++ b/abs/core/libatasmart/0001-Dont-test-undefined-bits.patch
@@ -0,0 +1,28 @@
+Author: Phillip Susi <psusi@ubuntu.com>
+Subject: fix an incorrect IO error reading SMART status
+Description: The read SMART status command's return status
+ was testing for a success/failure value that included 8
+ bits that are "N/A" according to the standard, and required
+ that they be zeros. At least some drives do not fill them
+ with zeros, so correct this by masking off the undefined
+ bits.
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61998
+Bug-Ubuntu: https://launchpad.net/bugs/1143495
+
+Index: b/atasmart.c
+===================================================================
+--- a/atasmart.c
++++ b/atasmart.c
+@@ -925,10 +925,10 @@
+ /* SAT/USB bridges truncate packets, so we only check for 4F,
+ * not for 2C on those */
+ if ((d->type == SK_DISK_TYPE_ATA_PASSTHROUGH_12 || cmd[3] == htons(0x00C2U)) &&
+- cmd[4] == htons(0x4F00U))
++ (cmd[4] & htons(0xFF00U)) == htons(0x4F00U))
+ *good = TRUE;
+ else if ((d->type == SK_DISK_TYPE_ATA_PASSTHROUGH_12 || cmd[3] == htons(0x002CU)) &&
+- cmd[4] == htons(0xF400U))
++ (cmd[4] & htons(0xFF00U)) == htons(0xF400U))
+ *good = FALSE;
+ else {
+ errno = EIO;