Fix issue with WD drives. Fixes bug #921430
https://bugs.freedesktop.org/show_bug.cgi?id=61998
This commit is contained in:
parent
839670931b
commit
3550371737
26
libatasmart-0.19-wd-fix.patch
Normal file
26
libatasmart-0.19-wd-fix.patch
Normal file
@ -0,0 +1,26 @@
|
||||
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.
|
||||
|
||||
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;
|
@ -1,9 +1,10 @@
|
||||
Name: libatasmart
|
||||
Version: 0.19
|
||||
Release: 12%{?dist}
|
||||
Release: 13%{?dist}
|
||||
Summary: ATA S.M.A.R.T. Disk Health Monitoring Library
|
||||
Group: System Environment/Libraries
|
||||
Source0: http://0pointer.de/public/libatasmart-%{version}.tar.xz
|
||||
Patch0: libatasmart-0.19-wd-fix.patch
|
||||
License: LGPLv2+
|
||||
Url: http://git.0pointer.de/?p=libatasmart.git;a=summary
|
||||
BuildRequires: systemd-devel
|
||||
@ -26,7 +27,7 @@ Development Files for libatasmart Client Development
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%configure --disable-static
|
||||
@ -53,6 +54,10 @@ rm $RPM_BUILD_ROOT%{_docdir}/libatasmart/README
|
||||
%doc blob-examples/SAMSUNG* blob-examples/ST* blob-examples/Maxtor* blob-examples/WDC* blob-examples/FUJITSU* blob-examples/INTEL* blob-examples/TOSHIBA* blob-examples/MCC*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 13 2017 Kevin Fenzi <kevin@scrye.com> - 0.19-13
|
||||
- Fix issue with WD drives. Fixes bug #921430
|
||||
- https://bugs.freedesktop.org/show_bug.cgi?id=61998
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.19-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user