Merge commit 'upstream/0.17'
Michael Biebl
14 years ago
25 | 25 | blob-examples/README \ |
26 | 26 | blob-examples/FUJITSU_MHY2120BH--0084000D \ |
27 | 27 | blob-examples/FUJITSU_MHY2120BH--0085000B \ |
28 | blob-examples/FUJITSU_MHY2120BH--0085000B \ | |
28 | blob-examples/FUJITSU_MHY2250BH--0085000B \ | |
29 | 29 | blob-examples/FUJITSU_MHZ2160BH_G1--0084000A \ |
30 | 30 | blob-examples/INTEL_SSDSA2MH080G1GC--045C8820 \ |
31 | 31 | blob-examples/Maxtor_96147H8--BAC51KJ0 \ |
32 | 32 | blob-examples/Maxtor_96147H8--BAC51KJ0--2 \ |
33 | blob-examples/MCCOE64GEMPP--2.9.09 \ | |
33 | 34 | blob-examples/SAMSUNG_HD501LJ--CR100-12 \ |
35 | blob-examples/SAMSUNG_MMCQE28G8MUP--0VA_VAM08L1Q \ | |
36 | blob-examples/SAMSUNG_MP0804H--UE100-14 \ | |
34 | 37 | blob-examples/ST320410A--3.39 \ |
35 | 38 | blob-examples/ST9160821AS--3.CLH \ |
39 | blob-examples/ST9100821AS--3.CME \ | |
36 | 40 | blob-examples/TOSHIBA_MK1651GSY--38IGT0G5T \ |
37 | 41 | blob-examples/WDC_WD2500JB--00REA0-20.00K20 \ |
38 | 42 | blob-examples/WDC_WD2500JS-75NCB3--10.02E04 \ |
331 | 331 | blob-examples/README \ |
332 | 332 | blob-examples/FUJITSU_MHY2120BH--0084000D \ |
333 | 333 | blob-examples/FUJITSU_MHY2120BH--0085000B \ |
334 | blob-examples/FUJITSU_MHY2120BH--0085000B \ | |
334 | blob-examples/FUJITSU_MHY2250BH--0085000B \ | |
335 | 335 | blob-examples/FUJITSU_MHZ2160BH_G1--0084000A \ |
336 | 336 | blob-examples/INTEL_SSDSA2MH080G1GC--045C8820 \ |
337 | 337 | blob-examples/Maxtor_96147H8--BAC51KJ0 \ |
338 | 338 | blob-examples/Maxtor_96147H8--BAC51KJ0--2 \ |
339 | blob-examples/MCCOE64GEMPP--2.9.09 \ | |
339 | 340 | blob-examples/SAMSUNG_HD501LJ--CR100-12 \ |
341 | blob-examples/SAMSUNG_MMCQE28G8MUP--0VA_VAM08L1Q \ | |
342 | blob-examples/SAMSUNG_MP0804H--UE100-14 \ | |
340 | 343 | blob-examples/ST320410A--3.39 \ |
341 | 344 | blob-examples/ST9160821AS--3.CLH \ |
345 | blob-examples/ST9100821AS--3.CME \ | |
342 | 346 | blob-examples/TOSHIBA_MK1651GSY--38IGT0G5T \ |
343 | 347 | blob-examples/WDC_WD2500JB--00REA0-20.00K20 \ |
344 | 348 | blob-examples/WDC_WD2500JS-75NCB3--10.02E04 \ |
48 | 48 | |
49 | 49 | REQUIREMENTS: |
50 | 50 | None (except Linux with a GLibc) |
51 | ||
52 | BUGS: | |
53 | http://bugs.freedesktop.org/buglist.cgi?bug_status=__open__&product=libatasmart |
107 | 107 | uint8_t smart_data[512]; |
108 | 108 | uint8_t smart_thresholds[512]; |
109 | 109 | |
110 | SkBool smart_initialized:1; | |
111 | ||
110 | 112 | SkBool identify_valid:1; |
111 | 113 | SkBool smart_data_valid:1; |
112 | 114 | SkBool smart_thresholds_valid:1; |
147 | 149 | #define SK_MSECOND_VALID_MIN 1ULL |
148 | 150 | #define SK_MSECOND_VALID_SHORT_MAX (60ULL * 60ULL * 1000ULL) |
149 | 151 | #define SK_MSECOND_VALID_LONG_MAX (30ULL * 365ULL * 24ULL * 60ULL * 60ULL * 1000ULL) |
152 | ||
153 | int init_smart(SkDisk *d); | |
150 | 154 | |
151 | 155 | static const char *disk_type_to_human_string(SkDiskType type) { |
152 | 156 | |
817 | 821 | int ret; |
818 | 822 | size_t len = 512; |
819 | 823 | |
824 | if (init_smart(d) < 0) | |
825 | return -1; | |
826 | ||
820 | 827 | if (!disk_smart_is_available(d)) { |
821 | 828 | errno = ENOTSUP; |
822 | 829 | return -1; |
873 | 880 | int sk_disk_smart_status(SkDisk *d, SkBool *good) { |
874 | 881 | uint16_t cmd[6]; |
875 | 882 | int ret; |
883 | ||
884 | if (init_smart(d) < 0) | |
885 | return -1; | |
876 | 886 | |
877 | 887 | if (!disk_smart_is_available(d)) { |
878 | 888 | errno = ENOTSUP; |
919 | 929 | int sk_disk_smart_self_test(SkDisk *d, SkSmartSelfTest test) { |
920 | 930 | uint16_t cmd[6]; |
921 | 931 | int ret; |
932 | ||
933 | if (init_smart(d) < 0) | |
934 | return -1; | |
922 | 935 | |
923 | 936 | if (!disk_smart_is_available(d)) { |
924 | 937 | errno = ENOTSUP; |
1335 | 1348 | SK_SMART_QUIRK_9_UNKNOWN = 0x0400, |
1336 | 1349 | SK_SMART_QUIRK_197_UNKNOWN = 0x0800, |
1337 | 1350 | SK_SMART_QUIRK_198_UNKNOWN = 0x1000, |
1351 | SK_SMART_QUIRK_190_UNKNOWN = 0x2000 | |
1338 | 1352 | } SkSmartQuirk; |
1339 | 1353 | |
1340 | 1354 | /* %STRINGPOOLSTART% */ |
1352 | 1366 | "9_UNKNOWN", |
1353 | 1367 | "197_UNKNOWN", |
1354 | 1368 | "198_UNKNOWN", |
1369 | "190_UNKNOWN", | |
1355 | 1370 | NULL |
1356 | 1371 | }; |
1357 | 1372 | /* %STRINGPOOLSTOP% */ |
1496 | 1511 | "^MBZOC60P$", |
1497 | 1512 | SK_SMART_QUIRK_5_UNKNOWN |
1498 | 1513 | }, { |
1514 | ||
1515 | /*** Apple SSD (?) http://bugs.freedesktop.org/show_bug.cgi?id=24700 */ | |
1516 | "^MCCOE64GEMPP$", | |
1517 | "^2.9.09$", | |
1518 | SK_SMART_QUIRK_5_UNKNOWN| | |
1519 | SK_SMART_QUIRK_190_UNKNOWN | |
1520 | }, { | |
1499 | 1521 | NULL, |
1500 | 1522 | NULL, |
1501 | 1523 | 0 |
1606 | 1628 | } else if (quirk & SK_SMART_QUIRK_9_UNKNOWN) |
1607 | 1629 | return NULL; |
1608 | 1630 | /* %STRINGPOOLSTOP% */ |
1631 | ||
1632 | break; | |
1633 | ||
1634 | case 190: | |
1635 | if (quirk & SK_SMART_QUIRK_190_UNKNOWN) | |
1636 | return NULL; | |
1609 | 1637 | |
1610 | 1638 | break; |
1611 | 1639 | |
2519 | 2547 | return r; |
2520 | 2548 | } |
2521 | 2549 | |
2550 | int init_smart(SkDisk *d) { | |
2551 | /* We don't do the SMART initialization right-away, since some | |
2552 | * drivers spin up when we do that */ | |
2553 | ||
2554 | int ret; | |
2555 | ||
2556 | if (d->smart_initialized) | |
2557 | return 0; | |
2558 | ||
2559 | d->smart_initialized = TRUE; | |
2560 | ||
2561 | /* Check if driver can do SMART, and enable if necessary */ | |
2562 | if (!disk_smart_is_available(d)) | |
2563 | return 0; | |
2564 | ||
2565 | if (!disk_smart_is_enabled(d)) { | |
2566 | if ((ret = disk_smart_enable(d, TRUE)) < 0) | |
2567 | goto fail; | |
2568 | ||
2569 | if ((ret = disk_identify_device(d)) < 0) | |
2570 | goto fail; | |
2571 | ||
2572 | if (!disk_smart_is_enabled(d)) { | |
2573 | errno = EIO; | |
2574 | ret = -1; | |
2575 | goto fail; | |
2576 | } | |
2577 | } | |
2578 | ||
2579 | disk_smart_read_thresholds(d); | |
2580 | ||
2581 | fail: | |
2582 | return ret; | |
2583 | } | |
2584 | ||
2522 | 2585 | int sk_disk_open(const char *name, SkDisk **_d) { |
2523 | 2586 | SkDisk *d; |
2524 | 2587 | int ret = -1; |
2593 | 2656 | d->type = SK_DISK_TYPE_NONE; |
2594 | 2657 | } else |
2595 | 2658 | disk_identify_device(d); |
2596 | ||
2597 | /* Check if driver can do SMART, and enable if necessary */ | |
2598 | if (disk_smart_is_available(d)) { | |
2599 | ||
2600 | if (!disk_smart_is_enabled(d)) { | |
2601 | if ((ret = disk_smart_enable(d, TRUE)) < 0) | |
2602 | goto fail; | |
2603 | ||
2604 | if ((ret = disk_identify_device(d)) < 0) | |
2605 | goto fail; | |
2606 | ||
2607 | if (!disk_smart_is_enabled(d)) { | |
2608 | errno = EIO; | |
2609 | ret = -1; | |
2610 | goto fail; | |
2611 | } | |
2612 | } | |
2613 | ||
2614 | disk_smart_read_thresholds(d); | |
2615 | } | |
2616 | 2659 | } |
2617 | 2660 | |
2618 | 2661 | *_d = d; |
2650 | 2693 | size = |
2651 | 2694 | (d->identify_valid ? 8 + sizeof(d->identify) : 0) + |
2652 | 2695 | (d->smart_data_valid ? 8 + sizeof(d->smart_data) : 0) + |
2653 | (d->smart_thresholds ? 8 + sizeof(d->smart_thresholds) : 0); | |
2696 | (d->smart_thresholds_valid ? 8 + sizeof(d->smart_thresholds) : 0); | |
2654 | 2697 | |
2655 | 2698 | if (sk_disk_smart_status(d, &good) >= 0) { |
2656 | 2699 | size += 12; |
0 | /* Saved 113 relocations, saved 2 strings (19 b) due to suffix compression. */ | |
0 | /* Saved 114 relocations, saved 2 strings (19 b) due to suffix compression. */ | |
1 | 1 | static const char _strpool_[] = |
2 | 2 | "16 Byte SCSI ATA SAT Passthru\0" |
3 | 3 | "12 Byte SCSI ATA SAT Passthru\0" |
97 | 97 | "9_UNKNOWN\0" |
98 | 98 | "197_UNKNOWN\0" |
99 | 99 | "198_UNKNOWN\0" |
100 | "190_UNKNOWN\0" | |
100 | 101 | "power-on-minutes\0" |
101 | 102 | "power-on-seconds\0" |
102 | 103 | "power-on-half-minutes\0" |
233 | 234 | uint8_t smart_data[512]; |
234 | 235 | uint8_t smart_thresholds[512]; |
235 | 236 | |
237 | SkBool smart_initialized:1; | |
238 | ||
236 | 239 | SkBool identify_valid:1; |
237 | 240 | SkBool smart_data_valid:1; |
238 | 241 | SkBool smart_thresholds_valid:1; |
273 | 276 | #define SK_MSECOND_VALID_MIN 1ULL |
274 | 277 | #define SK_MSECOND_VALID_SHORT_MAX (60ULL * 60ULL * 1000ULL) |
275 | 278 | #define SK_MSECOND_VALID_LONG_MAX (30ULL * 365ULL * 24ULL * 60ULL * 60ULL * 1000ULL) |
279 | ||
280 | int init_smart(SkDisk *d); | |
276 | 281 | |
277 | 282 | static const char *disk_type_to_human_string(SkDiskType type) { |
278 | 283 | |
943 | 948 | int ret; |
944 | 949 | size_t len = 512; |
945 | 950 | |
951 | if (init_smart(d) < 0) | |
952 | return -1; | |
953 | ||
946 | 954 | if (!disk_smart_is_available(d)) { |
947 | 955 | errno = ENOTSUP; |
948 | 956 | return -1; |
999 | 1007 | int sk_disk_smart_status(SkDisk *d, SkBool *good) { |
1000 | 1008 | uint16_t cmd[6]; |
1001 | 1009 | int ret; |
1010 | ||
1011 | if (init_smart(d) < 0) | |
1012 | return -1; | |
1002 | 1013 | |
1003 | 1014 | if (!disk_smart_is_available(d)) { |
1004 | 1015 | errno = ENOTSUP; |
1045 | 1056 | int sk_disk_smart_self_test(SkDisk *d, SkSmartSelfTest test) { |
1046 | 1057 | uint16_t cmd[6]; |
1047 | 1058 | int ret; |
1059 | ||
1060 | if (init_smart(d) < 0) | |
1061 | return -1; | |
1048 | 1062 | |
1049 | 1063 | if (!disk_smart_is_available(d)) { |
1050 | 1064 | errno = ENOTSUP; |
1461 | 1475 | SK_SMART_QUIRK_9_UNKNOWN = 0x0400, |
1462 | 1476 | SK_SMART_QUIRK_197_UNKNOWN = 0x0800, |
1463 | 1477 | SK_SMART_QUIRK_198_UNKNOWN = 0x1000, |
1478 | SK_SMART_QUIRK_190_UNKNOWN = 0x2000 | |
1464 | 1479 | } SkSmartQuirk; |
1465 | 1480 | |
1466 | 1481 | /* %STRINGPOOLSTART% */ |
1478 | 1493 | ((const char*) 2656), |
1479 | 1494 | ((const char*) 2666), |
1480 | 1495 | ((const char*) 2678), |
1496 | ((const char*) 2690), | |
1481 | 1497 | NULL |
1482 | 1498 | }; |
1483 | 1499 | /* %STRINGPOOLSTOP% */ |
1622 | 1638 | "^MBZOC60P$", |
1623 | 1639 | SK_SMART_QUIRK_5_UNKNOWN |
1624 | 1640 | }, { |
1641 | ||
1642 | /*** Apple SSD (?) http://bugs.freedesktop.org/show_bug.cgi?id=24700 */ | |
1643 | "^MCCOE64GEMPP$", | |
1644 | "^2.9.09$", | |
1645 | SK_SMART_QUIRK_5_UNKNOWN| | |
1646 | SK_SMART_QUIRK_190_UNKNOWN | |
1647 | }, { | |
1625 | 1648 | NULL, |
1626 | 1649 | NULL, |
1627 | 1650 | 0 |
1714 | 1737 | /* %STRINGPOOLSTART% */ |
1715 | 1738 | if (quirk & SK_SMART_QUIRK_9_POWERONMINUTES) { |
1716 | 1739 | static const SkSmartAttributeInfo a = { |
1717 | ((const char*) 2690), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time | |
1740 | ((const char*) 2702), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time | |
1718 | 1741 | }; |
1719 | 1742 | return &a; |
1720 | 1743 | |
1721 | 1744 | } else if (quirk & SK_SMART_QUIRK_9_POWERONSECONDS) { |
1722 | 1745 | static const SkSmartAttributeInfo a = { |
1723 | ((const char*) 2707), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time | |
1746 | ((const char*) 2719), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time | |
1724 | 1747 | }; |
1725 | 1748 | return &a; |
1726 | 1749 | |
1727 | 1750 | } else if (quirk & SK_SMART_QUIRK_9_POWERONHALFMINUTES) { |
1728 | 1751 | static const SkSmartAttributeInfo a = { |
1729 | ((const char*) 2724), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time | |
1752 | ((const char*) 2736), SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time | |
1730 | 1753 | }; |
1731 | 1754 | return &a; |
1732 | 1755 | } else if (quirk & SK_SMART_QUIRK_9_UNKNOWN) |
1735 | 1758 | |
1736 | 1759 | break; |
1737 | 1760 | |
1761 | case 190: | |
1762 | if (quirk & SK_SMART_QUIRK_190_UNKNOWN) | |
1763 | return NULL; | |
1764 | ||
1765 | break; | |
1766 | ||
1738 | 1767 | case 192: |
1739 | 1768 | /* %STRINGPOOLSTART% */ |
1740 | 1769 | if (quirk & SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT) { |
1741 | 1770 | static const SkSmartAttributeInfo a = { |
1742 | ((const char*) 2746), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL | |
1771 | ((const char*) 2758), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL | |
1743 | 1772 | }; |
1744 | 1773 | return &a; |
1745 | 1774 | } |
1751 | 1780 | /* %STRINGPOOLSTART% */ |
1752 | 1781 | if (quirk & SK_SMART_QUIRK_194_10XCELSIUS) { |
1753 | 1782 | static const SkSmartAttributeInfo a = { |
1754 | ((const char*) 2776), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature | |
1783 | ((const char*) 2788), SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature | |
1755 | 1784 | }; |
1756 | 1785 | return &a; |
1757 | 1786 | } else if (quirk & SK_SMART_QUIRK_194_UNKNOWN) |
1776 | 1805 | /* %STRINGPOOLSTART% */ |
1777 | 1806 | if (quirk & SK_SMART_QUIRK_200_WRITEERRORCOUNT) { |
1778 | 1807 | static const SkSmartAttributeInfo a = { |
1779 | ((const char*) 2802), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL | |
1808 | ((const char*) 2814), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL | |
1780 | 1809 | }; |
1781 | 1810 | return &a; |
1782 | 1811 | } |
1788 | 1817 | /* %STRINGPOOLSTART% */ |
1789 | 1818 | if (quirk & SK_SMART_QUIRK_201_DETECTEDTACOUNT) { |
1790 | 1819 | static const SkSmartAttributeInfo a = { |
1791 | ((const char*) 2820), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL | |
1820 | ((const char*) 2832), SK_SMART_ATTRIBUTE_UNIT_NONE, NULL | |
1792 | 1821 | }; |
1793 | 1822 | return &a; |
1794 | 1823 | } |
1983 | 2012 | const char * const map[] = { |
1984 | 2013 | [SK_SMART_ATTRIBUTE_UNIT_UNKNOWN] = NULL, |
1985 | 2014 | [SK_SMART_ATTRIBUTE_UNIT_NONE] = ((const char*) 30), |
1986 | [SK_SMART_ATTRIBUTE_UNIT_MSECONDS] = ((const char*) 2838), | |
1987 | [SK_SMART_ATTRIBUTE_UNIT_SECTORS] = ((const char*) 2841), | |
1988 | [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = ((const char*) 2849) | |
2015 | [SK_SMART_ATTRIBUTE_UNIT_MSECONDS] = ((const char*) 2850), | |
2016 | [SK_SMART_ATTRIBUTE_UNIT_SECTORS] = ((const char*) 2853), | |
2017 | [SK_SMART_ATTRIBUTE_UNIT_MKELVIN] = ((const char*) 2861) | |
1989 | 2018 | }; |
1990 | 2019 | /* %STRINGPOOLSTOP% */ |
1991 | 2020 | |
2175 | 2204 | |
2176 | 2205 | /* %STRINGPOOLSTART% */ |
2177 | 2206 | const char * const map[] = { |
2178 | [SK_SMART_OVERALL_GOOD] = ((const char*) 2852), | |
2179 | [SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST] = ((const char*) 2857), | |
2180 | [SK_SMART_OVERALL_BAD_SECTOR] = ((const char*) 2883), | |
2181 | [SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW] = ((const char*) 2894), | |
2182 | [SK_SMART_OVERALL_BAD_SECTOR_MANY] = ((const char*) 2912), | |
2183 | [SK_SMART_OVERALL_BAD_STATUS] = ((const char*) 2928), | |
2207 | [SK_SMART_OVERALL_GOOD] = ((const char*) 2864), | |
2208 | [SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST] = ((const char*) 2869), | |
2209 | [SK_SMART_OVERALL_BAD_SECTOR] = ((const char*) 2895), | |
2210 | [SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW] = ((const char*) 2906), | |
2211 | [SK_SMART_OVERALL_BAD_SECTOR_MANY] = ((const char*) 2924), | |
2212 | [SK_SMART_OVERALL_BAD_STATUS] = ((const char*) 2940), | |
2184 | 2213 | }; |
2185 | 2214 | /* %STRINGPOOLSTOP% */ |
2186 | 2215 | |
2645 | 2674 | return r; |
2646 | 2675 | } |
2647 | 2676 | |
2677 | int init_smart(SkDisk *d) { | |
2678 | /* We don't do the SMART initialization right-away, since some | |
2679 | * drivers spin up when we do that */ | |
2680 | ||
2681 | int ret; | |
2682 | ||
2683 | if (d->smart_initialized) | |
2684 | return 0; | |
2685 | ||
2686 | d->smart_initialized = TRUE; | |
2687 | ||
2688 | /* Check if driver can do SMART, and enable if necessary */ | |
2689 | if (!disk_smart_is_available(d)) | |
2690 | return 0; | |
2691 | ||
2692 | if (!disk_smart_is_enabled(d)) { | |
2693 | if ((ret = disk_smart_enable(d, TRUE)) < 0) | |
2694 | goto fail; | |
2695 | ||
2696 | if ((ret = disk_identify_device(d)) < 0) | |
2697 | goto fail; | |
2698 | ||
2699 | if (!disk_smart_is_enabled(d)) { | |
2700 | errno = EIO; | |
2701 | ret = -1; | |
2702 | goto fail; | |
2703 | } | |
2704 | } | |
2705 | ||
2706 | disk_smart_read_thresholds(d); | |
2707 | ||
2708 | fail: | |
2709 | return ret; | |
2710 | } | |
2711 | ||
2648 | 2712 | int sk_disk_open(const char *name, SkDisk **_d) { |
2649 | 2713 | SkDisk *d; |
2650 | 2714 | int ret = -1; |
2719 | 2783 | d->type = SK_DISK_TYPE_NONE; |
2720 | 2784 | } else |
2721 | 2785 | disk_identify_device(d); |
2722 | ||
2723 | /* Check if driver can do SMART, and enable if necessary */ | |
2724 | if (disk_smart_is_available(d)) { | |
2725 | ||
2726 | if (!disk_smart_is_enabled(d)) { | |
2727 | if ((ret = disk_smart_enable(d, TRUE)) < 0) | |
2728 | goto fail; | |
2729 | ||
2730 | if ((ret = disk_identify_device(d)) < 0) | |
2731 | goto fail; | |
2732 | ||
2733 | if (!disk_smart_is_enabled(d)) { | |
2734 | errno = EIO; | |
2735 | ret = -1; | |
2736 | goto fail; | |
2737 | } | |
2738 | } | |
2739 | ||
2740 | disk_smart_read_thresholds(d); | |
2741 | } | |
2742 | 2786 | } |
2743 | 2787 | |
2744 | 2788 | *_d = d; |
2776 | 2820 | size = |
2777 | 2821 | (d->identify_valid ? 8 + sizeof(d->identify) : 0) + |
2778 | 2822 | (d->smart_data_valid ? 8 + sizeof(d->smart_data) : 0) + |
2779 | (d->smart_thresholds ? 8 + sizeof(d->smart_thresholds) : 0); | |
2823 | (d->smart_thresholds_valid ? 8 + sizeof(d->smart_thresholds) : 0); | |
2780 | 2824 | |
2781 | 2825 | if (sk_disk_smart_status(d, &good) >= 0) { |
2782 | 2826 | size += 12; |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.63 for libatasmart 0.16. | |
2 | # Generated by GNU Autoconf 2.63 for libatasmart 0.17. | |
3 | 3 | # |
4 | 4 | # Report bugs to <mzyvongnfzneg (at) 0pointer (dot) net>. |
5 | 5 | # |
744 | 744 | # Identity of this package. |
745 | 745 | PACKAGE_NAME='libatasmart' |
746 | 746 | PACKAGE_TARNAME='libatasmart' |
747 | PACKAGE_VERSION='0.16' | |
748 | PACKAGE_STRING='libatasmart 0.16' | |
747 | PACKAGE_VERSION='0.17' | |
748 | PACKAGE_STRING='libatasmart 0.17' | |
749 | 749 | PACKAGE_BUGREPORT='mzyvongnfzneg (at) 0pointer (dot) net' |
750 | 750 | |
751 | 751 | ac_unique_file="atasmart.c" |
1488 | 1488 | # Omit some internal or obsolete options to make the list less imposing. |
1489 | 1489 | # This message is too long to be a string in the A/UX 3.1 sh. |
1490 | 1490 | cat <<_ACEOF |
1491 | \`configure' configures libatasmart 0.16 to adapt to many kinds of systems. | |
1491 | \`configure' configures libatasmart 0.17 to adapt to many kinds of systems. | |
1492 | 1492 | |
1493 | 1493 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1494 | 1494 | |
1558 | 1558 | |
1559 | 1559 | if test -n "$ac_init_help"; then |
1560 | 1560 | case $ac_init_help in |
1561 | short | recursive ) echo "Configuration of libatasmart 0.16:";; | |
1561 | short | recursive ) echo "Configuration of libatasmart 0.17:";; | |
1562 | 1562 | esac |
1563 | 1563 | cat <<\_ACEOF |
1564 | 1564 | |
1668 | 1668 | test -n "$ac_init_help" && exit $ac_status |
1669 | 1669 | if $ac_init_version; then |
1670 | 1670 | cat <<\_ACEOF |
1671 | libatasmart configure 0.16 | |
1671 | libatasmart configure 0.17 | |
1672 | 1672 | generated by GNU Autoconf 2.63 |
1673 | 1673 | |
1674 | 1674 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
1682 | 1682 | This file contains any messages produced by compilers while |
1683 | 1683 | running configure, to aid debugging if configure makes a mistake. |
1684 | 1684 | |
1685 | It was created by libatasmart $as_me 0.16, which was | |
1685 | It was created by libatasmart $as_me 0.17, which was | |
1686 | 1686 | generated by GNU Autoconf 2.63. Invocation command line was |
1687 | 1687 | |
1688 | 1688 | $ $0 $@ |
2548 | 2548 | |
2549 | 2549 | # Define the identity of the package. |
2550 | 2550 | PACKAGE='libatasmart' |
2551 | VERSION='0.16' | |
2551 | VERSION='0.17' | |
2552 | 2552 | |
2553 | 2553 | |
2554 | 2554 | cat >>confdefs.h <<_ACEOF |
2673 | 2673 | PACKAGE_URL=http://git.0pointer.de/?p=libatasmart.git |
2674 | 2674 | |
2675 | 2675 | |
2676 | LIBATASMART_VERSION_INFO=4:2:0 | |
2676 | LIBATASMART_VERSION_INFO=4:3:0 | |
2677 | 2677 | |
2678 | 2678 | |
2679 | 2679 | # Make sure we can run config.sub. |
18562 | 18562 | # report actual input values of CONFIG_FILES etc. instead of their |
18563 | 18563 | # values after options handling. |
18564 | 18564 | ac_log=" |
18565 | This file was extended by libatasmart $as_me 0.16, which was | |
18565 | This file was extended by libatasmart $as_me 0.17, which was | |
18566 | 18566 | generated by GNU Autoconf 2.63. Invocation command line was |
18567 | 18567 | |
18568 | 18568 | CONFIG_FILES = $CONFIG_FILES |
18625 | 18625 | _ACEOF |
18626 | 18626 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
18627 | 18627 | ac_cs_version="\\ |
18628 | libatasmart config.status 0.16 | |
18628 | libatasmart config.status 0.17 | |
18629 | 18629 | configured by $0, generated by GNU Autoconf 2.63, |
18630 | 18630 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" |
18631 | 18631 |
20 | 20 | |
21 | 21 | AC_PREREQ(2.63) |
22 | 22 | |
23 | AC_INIT([libatasmart], 0.16, [mzyvongnfzneg (at) 0pointer (dot) net]) | |
23 | AC_INIT([libatasmart], 0.17, [mzyvongnfzneg (at) 0pointer (dot) net]) | |
24 | 24 | AC_CONFIG_SRCDIR([atasmart.c]) |
25 | 25 | AC_CONFIG_HEADERS([config.h]) |
26 | 26 | AC_CONFIG_MACRO_DIR(m4) |
29 | 29 | |
30 | 30 | AC_SUBST(PACKAGE_URL, [http://git.0pointer.de/?p=libatasmart.git]) |
31 | 31 | |
32 | AC_SUBST(LIBATASMART_VERSION_INFO, [4:2:0]) | |
32 | AC_SUBST(LIBATASMART_VERSION_INFO, [4:3:0]) | |
33 | 33 | |
34 | 34 | AC_CANONICAL_HOST |
35 | 35 |