[arch-commits] Commit in libatasmart/repos/extra-x86_64 (6 files)

Jan de Groot jgc at archlinux.org
Sun Jun 3 21:26:17 UTC 2018


    Date: Sunday, June 3, 2018 @ 21:26:17
  Author: jgc
Revision: 325711

archrelease: copy trunk to extra-x86_64

Added:
  libatasmart/repos/extra-x86_64/0001-Dont-test-undefined-bits.patch
    (from rev 325710, libatasmart/trunk/0001-Dont-test-undefined-bits.patch)
  libatasmart/repos/extra-x86_64/0002-Drop-our-own-many-bad-sectors-heuristic.patch
    (from rev 325710, libatasmart/trunk/0002-Drop-our-own-many-bad-sectors-heuristic.patch)
  libatasmart/repos/extra-x86_64/PKGBUILD
    (from rev 325710, libatasmart/trunk/PKGBUILD)
Deleted:
  libatasmart/repos/extra-x86_64/0001-Dont-test-undefined-bits.patch
  libatasmart/repos/extra-x86_64/0002-Drop-our-own-many-bad-sectors-heuristic.patch
  libatasmart/repos/extra-x86_64/PKGBUILD

----------------------------------------------------+
 0001-Dont-test-undefined-bits.patch                |   56 ++---
 0002-Drop-our-own-many-bad-sectors-heuristic.patch |  186 +++++++++----------
 PKGBUILD                                           |   78 +++----
 3 files changed, 160 insertions(+), 160 deletions(-)

Deleted: 0001-Dont-test-undefined-bits.patch
===================================================================
--- 0001-Dont-test-undefined-bits.patch	2018-06-03 21:26:13 UTC (rev 325710)
+++ 0001-Dont-test-undefined-bits.patch	2018-06-03 21:26:17 UTC (rev 325711)
@@ -1,28 +0,0 @@
-Author: Phillip Susi <psusi at 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;

Copied: libatasmart/repos/extra-x86_64/0001-Dont-test-undefined-bits.patch (from rev 325710, libatasmart/trunk/0001-Dont-test-undefined-bits.patch)
===================================================================
--- 0001-Dont-test-undefined-bits.patch	                        (rev 0)
+++ 0001-Dont-test-undefined-bits.patch	2018-06-03 21:26:17 UTC (rev 325711)
@@ -0,0 +1,28 @@
+Author: Phillip Susi <psusi at 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;

Deleted: 0002-Drop-our-own-many-bad-sectors-heuristic.patch
===================================================================
--- 0002-Drop-our-own-many-bad-sectors-heuristic.patch	2018-06-03 21:26:13 UTC (rev 325710)
+++ 0002-Drop-our-own-many-bad-sectors-heuristic.patch	2018-06-03 21:26:17 UTC (rev 325711)
@@ -1,93 +0,0 @@
-From 6846b7c2431dbeaddd9f931c609b522c04e55732 Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martin.pitt at ubuntu.com>
-Date: Fri, 19 Mar 2010 14:56:06 +0100
-Subject: [PATCH 2/2] Drop our own "many bad sectors" heuristic
-
-This currently causes a lot of false positives, because in many cases our
-threshold is either overly pessimistically low, or the raw value is implausibly
-high. Just use the normalized values vs. threshold for now.
-
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25772
-Bug-Ubuntu: https://launchpad.net/bugs/438136
----
- atasmart.c |   33 +++++++++++----------------------
- 1 files changed, 11 insertions(+), 22 deletions(-)
-
-Index: libatasmart/atasmart.c
-===================================================================
---- libatasmart.orig/atasmart.c	2012-05-23 08:34:14.007836753 +0200
-+++ libatasmart/atasmart.c	2012-05-23 08:34:43.903835695 +0200
-@@ -130,6 +130,8 @@
-         SkBool current_pending_sector_found:1;
-         uint64_t reallocated_sector_count;
-         uint64_t current_pending_sector;
-+        SkBool reallocated_sector_count_bad:1;
-+        SkBool current_pending_sector_bad:1;
- 
-         void *blob;
- };
-@@ -2190,16 +2192,23 @@
-         if (a->pretty_unit != SK_SMART_ATTRIBUTE_UNIT_SECTORS)
-                 return;
- 
-+        if (!a->current_value_valid)
-+                return;
-+
-         if (!strcmp(a->name, "reallocated-sector-count")) {
-                 if (a->pretty_value > d->reallocated_sector_count)
-                         d->reallocated_sector_count = a->pretty_value;
-                 d->reallocated_sector_count_found = TRUE;
-+                if (a->good_now_valid && !a->good_now)
-+                        d->reallocated_sector_count_bad = TRUE;
-         }
- 
-         if (!strcmp(a->name, "current-pending-sector")) {
-                 if (a->pretty_value > d->current_pending_sector)
-                         d->current_pending_sector = a->pretty_value;
-                 d->current_pending_sector_found = TRUE;
-+                if (a->good_now_valid && !a->good_now)
-+                        d->current_pending_sector_bad = TRUE;
-         }
- }
- 
-@@ -2255,24 +2264,9 @@
-         return _P(map[overall]);
- }
- 
--static uint64_t u64log2(uint64_t n) {
--        unsigned r;
--
--        if (n <= 1)
--                return 0;
--
--        r = 0;
--        for (;;) {
--                n = n >> 1;
--                if (!n)
--                        return r;
--                r++;
--        }
--}
--
- int sk_disk_smart_get_overall(SkDisk *d, SkSmartOverall *overall) {
-         SkBool good;
--        uint64_t sectors, sector_threshold;
-+        uint64_t sectors;
- 
-         assert(d);
-         assert(overall);
-@@ -2293,13 +2287,7 @@
-                         return -1;
-                 sectors = 0;
-         } else {
--
--                /* We use log2(n_sectors)*1024 as a threshold here. We
--                 * had to pick something, and this makes a bit of
--                 * sense, or doesn't it? */
--                sector_threshold = u64log2(d->size/512) * 1024;
--
--                if (sectors >= sector_threshold) {
-+                if (d->reallocated_sector_count_bad || d->current_pending_sector_bad) {
-                         *overall = SK_SMART_OVERALL_BAD_SECTOR_MANY;
-                         return 0;
-                 }

Copied: libatasmart/repos/extra-x86_64/0002-Drop-our-own-many-bad-sectors-heuristic.patch (from rev 325710, libatasmart/trunk/0002-Drop-our-own-many-bad-sectors-heuristic.patch)
===================================================================
--- 0002-Drop-our-own-many-bad-sectors-heuristic.patch	                        (rev 0)
+++ 0002-Drop-our-own-many-bad-sectors-heuristic.patch	2018-06-03 21:26:17 UTC (rev 325711)
@@ -0,0 +1,93 @@
+From 6846b7c2431dbeaddd9f931c609b522c04e55732 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt at ubuntu.com>
+Date: Fri, 19 Mar 2010 14:56:06 +0100
+Subject: [PATCH 2/2] Drop our own "many bad sectors" heuristic
+
+This currently causes a lot of false positives, because in many cases our
+threshold is either overly pessimistically low, or the raw value is implausibly
+high. Just use the normalized values vs. threshold for now.
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25772
+Bug-Ubuntu: https://launchpad.net/bugs/438136
+---
+ atasmart.c |   33 +++++++++++----------------------
+ 1 files changed, 11 insertions(+), 22 deletions(-)
+
+Index: libatasmart/atasmart.c
+===================================================================
+--- libatasmart.orig/atasmart.c	2012-05-23 08:34:14.007836753 +0200
++++ libatasmart/atasmart.c	2012-05-23 08:34:43.903835695 +0200
+@@ -130,6 +130,8 @@
+         SkBool current_pending_sector_found:1;
+         uint64_t reallocated_sector_count;
+         uint64_t current_pending_sector;
++        SkBool reallocated_sector_count_bad:1;
++        SkBool current_pending_sector_bad:1;
+ 
+         void *blob;
+ };
+@@ -2190,16 +2192,23 @@
+         if (a->pretty_unit != SK_SMART_ATTRIBUTE_UNIT_SECTORS)
+                 return;
+ 
++        if (!a->current_value_valid)
++                return;
++
+         if (!strcmp(a->name, "reallocated-sector-count")) {
+                 if (a->pretty_value > d->reallocated_sector_count)
+                         d->reallocated_sector_count = a->pretty_value;
+                 d->reallocated_sector_count_found = TRUE;
++                if (a->good_now_valid && !a->good_now)
++                        d->reallocated_sector_count_bad = TRUE;
+         }
+ 
+         if (!strcmp(a->name, "current-pending-sector")) {
+                 if (a->pretty_value > d->current_pending_sector)
+                         d->current_pending_sector = a->pretty_value;
+                 d->current_pending_sector_found = TRUE;
++                if (a->good_now_valid && !a->good_now)
++                        d->current_pending_sector_bad = TRUE;
+         }
+ }
+ 
+@@ -2255,24 +2264,9 @@
+         return _P(map[overall]);
+ }
+ 
+-static uint64_t u64log2(uint64_t n) {
+-        unsigned r;
+-
+-        if (n <= 1)
+-                return 0;
+-
+-        r = 0;
+-        for (;;) {
+-                n = n >> 1;
+-                if (!n)
+-                        return r;
+-                r++;
+-        }
+-}
+-
+ int sk_disk_smart_get_overall(SkDisk *d, SkSmartOverall *overall) {
+         SkBool good;
+-        uint64_t sectors, sector_threshold;
++        uint64_t sectors;
+ 
+         assert(d);
+         assert(overall);
+@@ -2293,13 +2287,7 @@
+                         return -1;
+                 sectors = 0;
+         } else {
+-
+-                /* We use log2(n_sectors)*1024 as a threshold here. We
+-                 * had to pick something, and this makes a bit of
+-                 * sense, or doesn't it? */
+-                sector_threshold = u64log2(d->size/512) * 1024;
+-
+-                if (sectors >= sector_threshold) {
++                if (d->reallocated_sector_count_bad || d->current_pending_sector_bad) {
+                         *overall = SK_SMART_OVERALL_BAD_SECTOR_MANY;
+                         return 0;
+                 }

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-06-03 21:26:13 UTC (rev 325710)
+++ PKGBUILD	2018-06-03 21:26:17 UTC (rev 325711)
@@ -1,39 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-
-pkgname=libatasmart
-pkgver=0.19
-pkgrel=3
-pkgdesc="ATA S.M.A.R.T. Reading and Parsing Library"
-arch=('i686' 'x86_64')
-license=('LGPL')
-depends=('libsystemd')
-makedepends=('systemd')
-url="http://0pointer.de/blog/projects/being-smart.html"
-source=(http://0pointer.de/public/${pkgname}-${pkgver}.tar.xz
-        0001-Dont-test-undefined-bits.patch
-        0002-Drop-our-own-many-bad-sectors-heuristic.patch)
-md5sums=('53afe2b155c36f658e121fe6def33e77'
-         'eb5d0468b0d47d099e5164372a21f9da'
-         'cebd1fbed0b05d0458177d6d3ad4ea3f')
-
-prepare() {
-  cd $pkgname-$pkgver
-  patch -Np1 -i ../0001-Dont-test-undefined-bits.patch
-  patch -Np1 -i ../0002-Drop-our-own-many-bad-sectors-heuristic.patch
-}
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  ./configure --prefix=/usr \
-    --sysconfdir=/etc \
-    --localstatedir=/var \
-    --sbindir=/usr/bin \
-    --disable-static
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-}

Copied: libatasmart/repos/extra-x86_64/PKGBUILD (from rev 325710, libatasmart/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-06-03 21:26:17 UTC (rev 325711)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=libatasmart
+pkgver=0.19
+pkgrel=4
+pkgdesc="ATA S.M.A.R.T. Reading and Parsing Library"
+arch=('x86_64')
+license=('LGPL')
+depends=('libsystemd')
+makedepends=('systemd')
+url="http://0pointer.de/blog/projects/being-smart.html"
+source=(http://0pointer.de/public/${pkgname}-${pkgver}.tar.xz
+        0001-Dont-test-undefined-bits.patch
+        0002-Drop-our-own-many-bad-sectors-heuristic.patch)
+sha256sums=('61f0ea345f63d28ab2ff0dc352c22271661b66bf09642db3a4049ac9dbdb0f8d'
+            'ab19d6985bb524774607280a2ee62c48de01785660ff5206d80f778b6404188c'
+            '9bb5ca3431f76c182c5b076e2db9378d696608c2ff1d53d01e55c530ba293ce1')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../0001-Dont-test-undefined-bits.patch
+  patch -Np1 -i ../0002-Drop-our-own-many-bad-sectors-heuristic.patch
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  ./configure --prefix=/usr \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --sbindir=/usr/bin \
+    --disable-static
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+}



More information about the arch-commits mailing list