From 4b1dd87aa64cdbb33165bc3a09dadb38d16c6366 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 18:15:17 +0000 Subject: Apply patch libatasmart-0.19-wd-fix.patch patch_name: libatasmart-0.19-wd-fix.patch present_in_specfile: true location_in_specfile: 1 --- diff --git a/atasmart.c b/atasmart.c index b054242..9244c45 100644 --- a/atasmart.c +++ b/atasmart.c @@ -923,10 +923,10 @@ int sk_disk_smart_status(SkDisk *d, SkBool *good) { /* 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;