Hello community,
here is the log from the commit of package libatasmart for openSUSE:Factory
checked in at Mon Nov 16 13:17:29 CET 2009.
--------
--- GNOME/libatasmart/libatasmart.changes 2009-10-02 15:21:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/libatasmart/libatasmart.changes 2009-11-13 13:21:59.000000000 +0100
@@ -1,0 +2,17 @@
+Fri Nov 13 12:54:33 CET 2009 - vuntz@opensuse.org
+
+- Update to version 0.17:
+ + Add various blobs
+ + Ignore attributes 5 and 190 on some Apple SSD
+ + Check the right boolean when calculating blob size
+ + Delay smart initialization until the first SMART call is done
+- Changes from version 0.16:
+ + Disable jmicron access mode for some more jmicron bridges
+- Changes from version 0.15:
+ + Support some ssd smart attrs
+ + Add various blobs.
+ + Blacklist 152d:2329 jmicron usb bridges
+ + Add vala vapi files.
+- Drop libatasmart-jmicron.patch: fixed upstream.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
libatasmart-0.14.tar.bz2
libatasmart-jmicron.patch
New:
----
libatasmart-0.17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libatasmart.spec ++++++
--- /var/tmp/diff_new_pack.44tMhO/_old 2009-11-16 13:15:57.000000000 +0100
+++ /var/tmp/diff_new_pack.44tMhO/_new 2009-11-16 13:15:57.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package libatasmart (Version 0.14)
+# spec file for package libatasmart (Version 0.17)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,15 +19,13 @@
Name: libatasmart
-Version: 0.14
-Release: 2
+Version: 0.17
+Release: 1
License: LGPL v2.1 or later
Summary: ATA S.M.A.R.T. Disk Health Monitoring Library
Url: http://git.0pointer.de/?p=libatasmart.git;a=summary
Group: System/Libraries
Source: %{name}-%{version}.tar.bz2
-# PATCH-FIX-UPSTREAM libatasmart-jmicron.patch vuntz@opensuse.org -- Taken from git
-Patch0: libatasmart-jmicron.patch
BuildRequires: libudev-devel
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -67,7 +65,6 @@
%prep
%setup -q
-%patch0 -p1
%build
%configure --disable-static
@@ -76,6 +73,8 @@
%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la
+# We already package this
+rm %{buildroot}%{_datadir}/doc/libatasmart/README
%clean
rm -rf %{buildroot}
@@ -99,5 +98,8 @@
%{_includedir}/atasmart.h
%{_libdir}/libatasmart.so
%{_libdir}/pkgconfig/libatasmart.pc
+%dir %{_datadir}/vala
+%dir %{_datadir}/vala/vapi
+%{_datadir}/vala/vapi/*.vapi
%changelog
++++++ libatasmart-0.14.tar.bz2 -> libatasmart-0.17.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatasmart-0.14/aclocal.m4 new/libatasmart-0.17/aclocal.m4
--- old/libatasmart-0.14/aclocal.m4 2009-08-06 21:25:20.000000000 +0200
+++ new/libatasmart-0.17/aclocal.m4 2009-10-27 03:14:15.000000000 +0100
@@ -3465,7 +3465,6 @@
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
cat <<_LT_EOF >> conftest.$ac_ext
-
/* The mapping between symbol names and symbols. */
const struct {
const char *name;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatasmart-0.14/atasmart.c new/libatasmart-0.17/atasmart.c
--- old/libatasmart-0.14/atasmart.c 2009-08-06 21:22:08.000000000 +0200
+++ new/libatasmart-0.17/atasmart.c 2009-10-24 00:37:59.000000000 +0200
@@ -108,6 +108,8 @@
uint8_t smart_data[512];
uint8_t smart_thresholds[512];
+ SkBool smart_initialized:1;
+
SkBool identify_valid:1;
SkBool smart_data_valid:1;
SkBool smart_thresholds_valid:1;
@@ -149,6 +151,8 @@
#define SK_MSECOND_VALID_SHORT_MAX (60ULL * 60ULL * 1000ULL)
#define SK_MSECOND_VALID_LONG_MAX (30ULL * 365ULL * 24ULL * 60ULL * 60ULL * 1000ULL)
+int init_smart(SkDisk *d);
+
static const char *disk_type_to_human_string(SkDiskType type) {
/* %STRINGPOOLSTART% */
@@ -818,6 +822,9 @@
int ret;
size_t len = 512;
+ if (init_smart(d) < 0)
+ return -1;
+
if (!disk_smart_is_available(d)) {
errno = ENOTSUP;
return -1;
@@ -875,6 +882,9 @@
uint16_t cmd[6];
int ret;
+ if (init_smart(d) < 0)
+ return -1;
+
if (!disk_smart_is_available(d)) {
errno = ENOTSUP;
return -1;
@@ -921,6 +931,9 @@
uint16_t cmd[6];
int ret;
+ if (init_smart(d) < 0)
+ return -1;
+
if (!disk_smart_is_available(d)) {
errno = ENOTSUP;
return -1;
@@ -1183,7 +1196,8 @@
a->pretty_value = (fourtyeight & 0xFFFF)*100 + 273150;
else if (!strcmp(a->name, "power-on-minutes"))
a->pretty_value = fourtyeight * 60 * 1000;
- else if (!strcmp(a->name, "power-on-seconds"))
+ else if (!strcmp(a->name, "power-on-seconds") ||
+ !strcmp(a->name, "power-on-seconds-2"))
a->pretty_value = fourtyeight * 1000;
else if (!strcmp(a->name, "power-on-half-minutes"))
a->pretty_value = fourtyeight * 30 * 1000;
@@ -1309,6 +1323,13 @@
[228] = { "power-off-retract-count-2", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
[230] = { "head-amplitude", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
[231] = { "temperature-celsius", SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
+
+ /* http://www.adtron.com/pdf/SMART_for_XceedLite_SATA_RevA.pdf */
+ [232] = { "endurance-remaining", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+ [233] = { "power-on-seconds-2", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+ [234] = { "uncorrectable-ecc-count", SK_SMART_ATTRIBUTE_UNIT_SECTORS, NULL },
+ [235] = { "good-block-rate", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+
[240] = { "head-flying-hours", SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
[250] = { "read-error-retry-rate", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL }
};
@@ -1328,6 +1349,7 @@
SK_SMART_QUIRK_9_UNKNOWN = 0x0400,
SK_SMART_QUIRK_197_UNKNOWN = 0x0800,
SK_SMART_QUIRK_198_UNKNOWN = 0x1000,
+ SK_SMART_QUIRK_190_UNKNOWN = 0x2000
} SkSmartQuirk;
/* %STRINGPOOLSTART% */
@@ -1345,6 +1367,7 @@
"9_UNKNOWN",
"197_UNKNOWN",
"198_UNKNOWN",
+ "190_UNKNOWN",
NULL
};
/* %STRINGPOOLSTOP% */
@@ -1489,6 +1512,13 @@
"^MBZOC60P$",
SK_SMART_QUIRK_5_UNKNOWN
}, {
+
+ /*** Apple SSD (?) http://bugs.freedesktop.org/show_bug.cgi?id=24700 */
+ "^MCCOE64GEMPP$",
+ "^2.9.09$",
+ SK_SMART_QUIRK_5_UNKNOWN|
+ SK_SMART_QUIRK_190_UNKNOWN
+ }, {
NULL,
NULL,
0
@@ -1602,6 +1632,12 @@
break;
+ case 190:
+ if (quirk & SK_SMART_QUIRK_190_UNKNOWN)
+ return NULL;
+
+ break;
+
case 192:
/* %STRINGPOOLSTART% */
if (quirk & SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT) {
@@ -1911,6 +1947,7 @@
if (!strcmp(a->name, "power-on-minutes") ||
!strcmp(a->name, "power-on-seconds") ||
+ !strcmp(a->name, "power-on-seconds-2") ||
!strcmp(a->name, "power-on-half-minutes") ||
!strcmp(a->name, "power-on-hours")) {
@@ -2465,15 +2502,30 @@
goto finish;
}
- if ((vid == 0x0c0b && pid == 0xb159) ||
- (vid == 0x04fc && pid == 0x0c25) ||
- (vid == 0x04fc && pid == 0x0c15))
- d->type = SK_DISK_TYPE_SUNPLUS;
- else if ((vid == 0x152d && pid == 0x2329) ||
- (vid == 0x152d && pid == 0x2336) ||
+ if ((vid == 0x152d && pid == 0x2329) ||
(vid == 0x152d && pid == 0x2338) ||
(vid == 0x152d && pid == 0x2339))
+ /* Some JMicron bridges seem to choke on SMART
+ * commands, so let's explicitly black list
+ * them here.
+ *
+ * https://bugzilla.redhat.com/show_bug.cgi?id=515881
+ *
+ * At least some of the JMicron bridges with
+ * these vids/pids choke on the jmicron access
+ * mode. To make sure we don't break things
+ * for people we now disable this by
+ * default.*/
+ d->type = SK_DISK_TYPE_NONE;
+ else if ((vid == 0x152d && pid == 0x2336))
+ /* This JMicron bridge seems to always work
+ * with SMART commands send with the jmicron
+ * access mode. */
d->type = SK_DISK_TYPE_JMICRON;
+ else if ((vid == 0x0c0b && pid == 0xb159) ||
+ (vid == 0x04fc && pid == 0x0c25) ||
+ (vid == 0x04fc && pid == 0x0c15))
+ d->type = SK_DISK_TYPE_SUNPLUS;
else
d->type = SK_DISK_TYPE_ATA_PASSTHROUGH_12;
@@ -2496,6 +2548,41 @@
return r;
}
+int init_smart(SkDisk *d) {
+ /* We don't do the SMART initialization right-away, since some
+ * drivers spin up when we do that */
+
+ int ret;
+
+ if (d->smart_initialized)
+ return 0;
+
+ d->smart_initialized = TRUE;
+
+ /* Check if driver can do SMART, and enable if necessary */
+ if (!disk_smart_is_available(d))
+ return 0;
+
+ if (!disk_smart_is_enabled(d)) {
+ if ((ret = disk_smart_enable(d, TRUE)) < 0)
+ goto fail;
+
+ if ((ret = disk_identify_device(d)) < 0)
+ goto fail;
+
+ if (!disk_smart_is_enabled(d)) {
+ errno = EIO;
+ ret = -1;
+ goto fail;
+ }
+ }
+
+ disk_smart_read_thresholds(d);
+
+fail:
+ return ret;
+}
+
int sk_disk_open(const char *name, SkDisk **_d) {
SkDisk *d;
int ret = -1;
@@ -2570,26 +2657,6 @@
d->type = SK_DISK_TYPE_NONE;
} else
disk_identify_device(d);
-
- /* Check if driver can do SMART, and enable if necessary */
- if (disk_smart_is_available(d)) {
-
- if (!disk_smart_is_enabled(d)) {
- if ((ret = disk_smart_enable(d, TRUE)) < 0)
- goto fail;
-
- if ((ret = disk_identify_device(d)) < 0)
- goto fail;
-
- if (!disk_smart_is_enabled(d)) {
- errno = EIO;
- ret = -1;
- goto fail;
- }
- }
-
- disk_smart_read_thresholds(d);
- }
}
*_d = d;
@@ -2627,7 +2694,7 @@
size =
(d->identify_valid ? 8 + sizeof(d->identify) : 0) +
(d->smart_data_valid ? 8 + sizeof(d->smart_data) : 0) +
- (d->smart_thresholds ? 8 + sizeof(d->smart_thresholds) : 0);
+ (d->smart_thresholds_valid ? 8 + sizeof(d->smart_thresholds) : 0);
if (sk_disk_smart_status(d, &good) >= 0) {
size += 12;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatasmart-0.14/atasmart.strpool.c new/libatasmart-0.17/atasmart.strpool.c
--- old/libatasmart-0.14/atasmart.strpool.c 2009-08-06 21:35:23.000000000 +0200
+++ new/libatasmart-0.17/atasmart.strpool.c 2009-10-27 03:16:20.000000000 +0100
@@ -1,4 +1,4 @@
-/* Saved 109 relocations, saved 2 strings (19 b) due to suffix compression. */
+/* Saved 114 relocations, saved 2 strings (19 b) due to suffix compression. */
static const char _strpool_[] =
"16 Byte SCSI ATA SAT Passthru\0"
"12 Byte SCSI ATA SAT Passthru\0"
@@ -79,6 +79,10 @@
"head-amplitude\0"
/*** Suppressed due to suffix:
"temperature-celsius\0" ***/
+ "endurance-remaining\0"
+ "power-on-seconds-2\0"
+ "uncorrectable-ecc-count\0"
+ "good-block-rate\0"
"head-flying-hours\0"
"read-error-retry-rate\0"
"9_POWERONMINUTES\0"
@@ -94,6 +98,7 @@
"9_UNKNOWN\0"
"197_UNKNOWN\0"
"198_UNKNOWN\0"
+ "190_UNKNOWN\0"
"power-on-minutes\0"
"power-on-seconds\0"
"power-on-half-minutes\0"
@@ -230,6 +235,8 @@
uint8_t smart_data[512];
uint8_t smart_thresholds[512];
+ SkBool smart_initialized:1;
+
SkBool identify_valid:1;
SkBool smart_data_valid:1;
SkBool smart_thresholds_valid:1;
@@ -271,6 +278,8 @@
#define SK_MSECOND_VALID_SHORT_MAX (60ULL * 60ULL * 1000ULL)
#define SK_MSECOND_VALID_LONG_MAX (30ULL * 365ULL * 24ULL * 60ULL * 60ULL * 1000ULL)
+int init_smart(SkDisk *d);
+
static const char *disk_type_to_human_string(SkDiskType type) {
/* %STRINGPOOLSTART% */
@@ -940,6 +949,9 @@
int ret;
size_t len = 512;
+ if (init_smart(d) < 0)
+ return -1;
+
if (!disk_smart_is_available(d)) {
errno = ENOTSUP;
return -1;
@@ -997,6 +1009,9 @@
uint16_t cmd[6];
int ret;
+ if (init_smart(d) < 0)
+ return -1;
+
if (!disk_smart_is_available(d)) {
errno = ENOTSUP;
return -1;
@@ -1043,6 +1058,9 @@
uint16_t cmd[6];
int ret;
+ if (init_smart(d) < 0)
+ return -1;
+
if (!disk_smart_is_available(d)) {
errno = ENOTSUP;
return -1;
@@ -1305,7 +1323,8 @@
a->pretty_value = (fourtyeight & 0xFFFF)*100 + 273150;
else if (!strcmp(a->name, "power-on-minutes"))
a->pretty_value = fourtyeight * 60 * 1000;
- else if (!strcmp(a->name, "power-on-seconds"))
+ else if (!strcmp(a->name, "power-on-seconds") ||
+ !strcmp(a->name, "power-on-seconds-2"))
a->pretty_value = fourtyeight * 1000;
else if (!strcmp(a->name, "power-on-half-minutes"))
a->pretty_value = fourtyeight * 30 * 1000;
@@ -1431,8 +1450,15 @@
[228] = { ((const char*) 2321), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
[230] = { ((const char*) 2347), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
[231] = { ((const char*) 1795), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
- [240] = { ((const char*) 2362), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
- [250] = { ((const char*) 2380), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL }
+
+ /* http://www.adtron.com/pdf/SMART_for_XceedLite_SATA_RevA.pdf */
+ [232] = { ((const char*) 2362), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+ [233] = { ((const char*) 2382), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+ [234] = { ((const char*) 2401), SK_SMART_ATTRIBUTE_UNIT_SECTORS, NULL },
+ [235] = { ((const char*) 2425), SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+
+ [240] = { ((const char*) 2441), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
+ [250] = { ((const char*) 2459), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL }
};
/* %STRINGPOOLSTOP% */
@@ -1450,23 +1476,25 @@
SK_SMART_QUIRK_9_UNKNOWN = 0x0400,
SK_SMART_QUIRK_197_UNKNOWN = 0x0800,
SK_SMART_QUIRK_198_UNKNOWN = 0x1000,
+ SK_SMART_QUIRK_190_UNKNOWN = 0x2000
} SkSmartQuirk;
/* %STRINGPOOLSTART% */
static const char *quirk_name[] = {
- ((const char*) 2402),
- ((const char*) 2419),
- ((const char*) 2436),
- ((const char*) 2457),
- ((const char*) 2485),
- ((const char*) 2500),
+ ((const char*) 2481),
+ ((const char*) 2498),
((const char*) 2515),
- ((const char*) 2527),
- ((const char*) 2547),
- ((const char*) 2567),
- ((const char*) 2577),
- ((const char*) 2587),
- ((const char*) 2599),
+ ((const char*) 2536),
+ ((const char*) 2564),
+ ((const char*) 2579),
+ ((const char*) 2594),
+ ((const char*) 2606),
+ ((const char*) 2626),
+ ((const char*) 2646),
+ ((const char*) 2656),
+ ((const char*) 2666),
+ ((const char*) 2678),
+ ((const char*) 2690),
NULL
};
/* %STRINGPOOLSTOP% */
@@ -1611,6 +1639,13 @@
"^MBZOC60P$",
SK_SMART_QUIRK_5_UNKNOWN
}, {
+
+ /*** Apple SSD (?) http://bugs.freedesktop.org/show_bug.cgi?id=24700 */
+ "^MCCOE64GEMPP$",
+ "^2.9.09$",
+ SK_SMART_QUIRK_5_UNKNOWN|
+ SK_SMART_QUIRK_190_UNKNOWN
+ }, {
NULL,
NULL,
0
@@ -1703,19 +1738,19 @@
/* %STRINGPOOLSTART% */
if (quirk & SK_SMART_QUIRK_9_POWERONMINUTES) {
static const SkSmartAttributeInfo a = {
- ((const char*) 2611), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
+ ((const char*) 2702), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
};
return &a;
} else if (quirk & SK_SMART_QUIRK_9_POWERONSECONDS) {
static const SkSmartAttributeInfo a = {
- ((const char*) 2628), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
+ ((const char*) 2719), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
};
return &a;
} else if (quirk & SK_SMART_QUIRK_9_POWERONHALFMINUTES) {
static const SkSmartAttributeInfo a = {
- ((const char*) 2645), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
+ ((const char*) 2736), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time
};
return &a;
} else if (quirk & SK_SMART_QUIRK_9_UNKNOWN)
@@ -1724,11 +1759,17 @@
break;
+ case 190:
+ if (quirk & SK_SMART_QUIRK_190_UNKNOWN)
+ return NULL;
+
+ break;
+
case 192:
/* %STRINGPOOLSTART% */
if (quirk & SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT) {
static const SkSmartAttributeInfo a = {
- ((const char*) 2667), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
+ ((const char*) 2758), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
};
return &a;
}
@@ -1740,7 +1781,7 @@
/* %STRINGPOOLSTART% */
if (quirk & SK_SMART_QUIRK_194_10XCELSIUS) {
static const SkSmartAttributeInfo a = {
- ((const char*) 2697), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature
+ ((const char*) 2788), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature
};
return &a;
} else if (quirk & SK_SMART_QUIRK_194_UNKNOWN)
@@ -1765,7 +1806,7 @@
/* %STRINGPOOLSTART% */
if (quirk & SK_SMART_QUIRK_200_WRITEERRORCOUNT) {
static const SkSmartAttributeInfo a = {
- ((const char*) 2723), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
+ ((const char*) 2814), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
};
return &a;
}
@@ -1777,7 +1818,7 @@
/* %STRINGPOOLSTART% */
if (quirk & SK_SMART_QUIRK_201_DETECTEDTACOUNT) {
static const SkSmartAttributeInfo a = {
- ((const char*) 2741), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
+ ((const char*) 2832), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL
};
return &a;
}
@@ -1972,9 +2013,9 @@
const char * const map[] = {
[SK_SMART_ATTRIBUTE_UNIT_UNKNOWN] = NULL,
[SK_SMART_ATTRIBUTE_UNIT_NONE] = ((const char*) 30),
- [SK_SMART_ATTRIBUTE_UNIT_MSECONDS] = ((const char*) 2759),
- [SK_SMART_ATTRIBUTE_UNIT_SECTORS] = ((const char*) 2762),
- [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = ((const char*) 2770)
+ [SK_SMART_ATTRIBUTE_UNIT_MSECONDS] = ((const char*) 2850),
+ [SK_SMART_ATTRIBUTE_UNIT_SECTORS] = ((const char*) 2853),
+ [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = ((const char*) 2861)
};
/* %STRINGPOOLSTOP% */
@@ -2033,6 +2074,7 @@
if (!strcmp(a->name, "power-on-minutes") ||
!strcmp(a->name, "power-on-seconds") ||
+ !strcmp(a->name, "power-on-seconds-2") ||
!strcmp(a->name, "power-on-half-minutes") ||
!strcmp(a->name, "power-on-hours")) {
@@ -2163,12 +2205,12 @@
/* %STRINGPOOLSTART% */
const char * const map[] = {
- [SK_SMART_OVERALL_GOOD] = ((const char*) 2773),
- [SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST] = ((const char*) 2778),
- [SK_SMART_OVERALL_BAD_SECTOR] = ((const char*) 2804),
- [SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW] = ((const char*) 2815),
- [SK_SMART_OVERALL_BAD_SECTOR_MANY] = ((const char*) 2833),
- [SK_SMART_OVERALL_BAD_STATUS] = ((const char*) 2849),
+ [SK_SMART_OVERALL_GOOD] = ((const char*) 2864),
+ [SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST] = ((const char*) 2869),
+ [SK_SMART_OVERALL_BAD_SECTOR] = ((const char*) 2895),
+ [SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW] = ((const char*) 2906),
+ [SK_SMART_OVERALL_BAD_SECTOR_MANY] = ((const char*) 2924),
+ [SK_SMART_OVERALL_BAD_STATUS] = ((const char*) 2940),
};
/* %STRINGPOOLSTOP% */
@@ -2587,15 +2629,30 @@
goto finish;
}
- if ((vid == 0x0c0b && pid == 0xb159) ||
- (vid == 0x04fc && pid == 0x0c25) ||
- (vid == 0x04fc && pid == 0x0c15))
- d->type = SK_DISK_TYPE_SUNPLUS;
- else if ((vid == 0x152d && pid == 0x2329) ||
- (vid == 0x152d && pid == 0x2336) ||
+ if ((vid == 0x152d && pid == 0x2329) ||
(vid == 0x152d && pid == 0x2338) ||
(vid == 0x152d && pid == 0x2339))
+ /* Some JMicron bridges seem to choke on SMART
+ * commands, so let's explicitly black list
+ * them here.
+ *
+ * https://bugzilla.redhat.com/show_bug.cgi?id=515881
+ *
+ * At least some of the JMicron bridges with
+ * these vids/pids choke on the jmicron access
+ * mode. To make sure we don't break things
+ * for people we now disable this by
+ * default.*/
+ d->type = SK_DISK_TYPE_NONE;
+ else if ((vid == 0x152d && pid == 0x2336))
+ /* This JMicron bridge seems to always work
+ * with SMART commands send with the jmicron
+ * access mode. */
d->type = SK_DISK_TYPE_JMICRON;
+ else if ((vid == 0x0c0b && pid == 0xb159) ||
+ (vid == 0x04fc && pid == 0x0c25) ||
+ (vid == 0x04fc && pid == 0x0c15))
+ d->type = SK_DISK_TYPE_SUNPLUS;
else
d->type = SK_DISK_TYPE_ATA_PASSTHROUGH_12;
@@ -2618,6 +2675,41 @@
return r;
}
+int init_smart(SkDisk *d) {
+ /* We don't do the SMART initialization right-away, since some
+ * drivers spin up when we do that */
+
+ int ret;
+
+ if (d->smart_initialized)
+ return 0;
+
+ d->smart_initialized = TRUE;
+
+ /* Check if driver can do SMART, and enable if necessary */
+ if (!disk_smart_is_available(d))
+ return 0;
+
+ if (!disk_smart_is_enabled(d)) {
+ if ((ret = disk_smart_enable(d, TRUE)) < 0)
+ goto fail;
+
+ if ((ret = disk_identify_device(d)) < 0)
+ goto fail;
+
+ if (!disk_smart_is_enabled(d)) {
+ errno = EIO;
+ ret = -1;
+ goto fail;
+ }
+ }
+
+ disk_smart_read_thresholds(d);
+
+fail:
+ return ret;
+}
+
int sk_disk_open(const char *name, SkDisk **_d) {
SkDisk *d;
int ret = -1;
@@ -2692,26 +2784,6 @@
d->type = SK_DISK_TYPE_NONE;
} else
disk_identify_device(d);
-
- /* Check if driver can do SMART, and enable if necessary */
- if (disk_smart_is_available(d)) {
-
- if (!disk_smart_is_enabled(d)) {
- if ((ret = disk_smart_enable(d, TRUE)) < 0)
- goto fail;
-
- if ((ret = disk_identify_device(d)) < 0)
- goto fail;
-
- if (!disk_smart_is_enabled(d)) {
- errno = EIO;
- ret = -1;
- goto fail;
- }
- }
-
- disk_smart_read_thresholds(d);
- }
}
*_d = d;
@@ -2749,7 +2821,7 @@
size =
(d->identify_valid ? 8 + sizeof(d->identify) : 0) +
(d->smart_data_valid ? 8 + sizeof(d->smart_data) : 0) +
- (d->smart_thresholds ? 8 + sizeof(d->smart_thresholds) : 0);
+ (d->smart_thresholds_valid ? 8 + sizeof(d->smart_thresholds) : 0);
if (sk_disk_smart_status(d, &good) >= 0) {
size += 12;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatasmart-0.14/atasmart.vapi new/libatasmart-0.17/atasmart.vapi
--- old/libatasmart-0.14/atasmart.vapi 2008-07-01 20:20:35.000000000 +0200
+++ new/libatasmart-0.17/atasmart.vapi 1970-01-01 01:00:00.000000000 +0100
@@ -1,140 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
-
-/***
- This file is part of libatasmart.
-
- Copyright 2008 Lennart Poettering
-
- libatasmart is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 2.1 of the
- License, or (at your option) any later version.
-
- libatasmart is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with libatasmart. If not, If not, see
- http://www.gnu.org/licenses/.
-***/
-
-using GLib;
-
-[CCode (cheader_filename="atasmart.h")]
-namespace Smart {
-
- [CCode (cname="SkSmartSelfTest", cprefix="SK_SMART_SELF_TEST_")]
- public enum SmartSelfTest {
- SHORT, EXTENDED, CONVEYANCE, ABORT
- }
-
- [Immutable]
- [CCode (cname="SkIdentifyParsedData")]
- public struct IdentifyParsedData {
- public string serial;
- public string firmware;
- public string model;
- }
-
- [CCode (cname="SkSmartOfflineDataCollectionStatus", cprefix="SK_SMART_OFFLINE_DATA_COLLECTION_STATUS_")]
- public enum SmartOfflineDataCollectionStatus {
- NEVER, SUCCESS, INPROGRESS, SUSPENDED, ABORTED, FATAL, UNKNOWN
- }
-
- [CCode (cname="sk_smart_offline_data_collection_status_to_string")]
- public weak string smart_offline_data_collection_status_to_string(SmartOfflineDataCollectionStatus status);
-
-
- [CCode (cname="SkSmartSelfTestExecutionStatus", cprefix="SK_SMART_SELF_TEST_EXECUTION_STATUS_")]
- public enum SmartSelfTestExecutionStatus {
- SUCCESS_OR_NEVER, ABORTED, INTERRUPTED, FATAL, ERROR_UNKNOWN, ERROR_ELECTRICAL, ERROR_SERVO, ERROR_READ, ERROR_HANDLING, INPROGRESS
- }
-
- [CCode (cname="sk_smart_self_test_execution_status_to_string")]
- public weak string smart_self_test_execution_status_to_string(SmartSelfTestExecutionStatus status);
-
- [Immutable]
- [CCode (cname="SkSmartParsedData")]
- public struct SmartParsedData {
- public SmartOfflineDataCollectionStatus offline_data_collection_status;
- public uint total_offline_data_collection_seconds;
- public SmartSelfTestExecutionStatus self_test_execution_status;
- public uint self_test_execution_percent_remaining;
-
- public bool conveyance_test_available;
- public bool short_and_extended_test_available;
- public bool start_test_available;
- public bool abort_test_available;
-
- public uint short_test_polling_minutes;
- public uint extended_test_polling_minutes;
- public uint conveyance_test_polling_minutes;
-
- [CCode (cname="sk_smart_self_test_available")]
- public bool self_test_available(SmartSelfTest test);
-
- [CCode (cname="sk_smart_self_test_polling_minutes")]
- public uint self_test_polling_minutes(SmartSelfTest test);
- }
-
- [CCode (cname="SkSmartAttributeUnit", cprefix="SK_SMART_ATTRIBUTE_UNIT_")]
- public enum SmartAttributeUnit {
- UNKNOWN, NONE, MSECONDS, SECTORS, MKELVIN
- }
-
- [CCode (cname="sk_smart_attribute_unit_to_string")]
- public weak string smart_attribute_unit_to_string(SmartAttributeUnit unit);
-
- [Immutable]
- [CCode (cname="SkSmartAttributeParsedData")]
- public struct SmartAttributeParsedData {
- public uint8 id;
- public string name;
- public SmartAttributeUnit pretty_unit;
- public uint16 flags;
- public uint8 threshold;
- public bool threshold_valid;
- public bool online;
- public bool prefailure;
- public bool good;
- public uint8 current_value;
- public uint8 worst_value;
- public uint64 pretty_value;
- public uint8[6] raw;
- }
-
- [CCode (cname="SkSmartAttributeParseCallback")]
- public delegate void SmartAttributeParseCallback(void* disk, SmartAttributeParsedData a);
-
- [Compact]
- [CCode (free_function="sk_disk_free", cname="SkDisk", cprefix="sk_disk_")]
- public class Disk {
-
- public static int open(string name, out Disk disk);
-
- public int get_size(out uint64 bytes);
-
- public int check_sleep_mode(out bool awake);
-
- public int identify_is_available(out bool available);
- public int identify_parse(out weak IdentifyParsedData* data);
-
- public int smart_is_available(out bool available);
- public int smart_status(out bool good);
- public int smart_read_data();
- public int smart_parse_attributes(SmartAttributeParseCallback cb);
- public int smart_parse(out weak SmartParsedData* data);
- public int smart_self_test(SmartSelfTest test);
-
- public int dump();
- }
-
- /* These two should move to an official vala package */
- [CCode (cname="errno", cheader_filename="errno.h")]
- public int errno;
-
- [CCode (cname="g_strerror", cheader_filename="glib.h")]
- public weak string strerror(int err);
-}
Files old/libatasmart-0.14/blob-examples/FUJITSU_MHY2250BH--0085000B and new/libatasmart-0.17/blob-examples/FUJITSU_MHY2250BH--0085000B differ
Files old/libatasmart-0.14/blob-examples/INTEL_SSDSA2MH080G1GC--045C8820 and new/libatasmart-0.17/blob-examples/INTEL_SSDSA2MH080G1GC--045C8820 differ
Files old/libatasmart-0.14/blob-examples/Maxtor_96147H8--BAC51KJ0--2 and new/libatasmart-0.17/blob-examples/Maxtor_96147H8--BAC51KJ0--2 differ
Files old/libatasmart-0.14/blob-examples/MCCOE64GEMPP--2.9.09 and new/libatasmart-0.17/blob-examples/MCCOE64GEMPP--2.9.09 differ
Files old/libatasmart-0.14/blob-examples/SAMSUNG_MMCQE28G8MUP--0VA_VAM08L1Q and new/libatasmart-0.17/blob-examples/SAMSUNG_MMCQE28G8MUP--0VA_VAM08L1Q differ
Files old/libatasmart-0.14/blob-examples/SAMSUNG_MP0804H--UE100-14 and new/libatasmart-0.17/blob-examples/SAMSUNG_MP0804H--UE100-14 differ
Files old/libatasmart-0.14/blob-examples/ST9100821AS--3.CME and new/libatasmart-0.17/blob-examples/ST9100821AS--3.CME differ
Files old/libatasmart-0.14/blob-examples/TOSHIBA_MK1651GSY--38IGT0G5T and new/libatasmart-0.17/blob-examples/TOSHIBA_MK1651GSY--38IGT0G5T differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatasmart-0.14/configure new/libatasmart-0.17/configure
--- old/libatasmart-0.14/configure 2009-08-06 21:35:06.000000000 +0200
+++ new/libatasmart-0.17/configure 2009-10-27 03:14:17.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for libatasmart 0.14.
+# Generated by GNU Autoconf 2.63 for libatasmart 0.17.
#
# Report bugs to