diff --git a/6000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch b/6000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch deleted file mode 100644 index c84ecf1999c0461096ab94dab3e3d478c652a514..0000000000000000000000000000000000000000 --- a/6000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d936fd78afb9d1fa68237367f33ebaa4f0ac1de4 Mon Sep 17 00:00:00 2001 -From: samm-git -Date: Mon, 6 Nov 2017 22:06:52 +0000 -Subject: [PATCH 004/291] os_linux.cpp/os_netbsd.cpp: fix crash on --scan if - WITH_NVME_DEVICESCAN is not set and '-d ' is not specified - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4599 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 5 +++++ - smartmontools/os_linux.cpp | 2 +- - smartmontools/os_netbsd.cpp | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp -index 407f3cd2..46958ae0 100644 ---- a/smartmontools/os_linux.cpp -+++ b/smartmontools/os_linux.cpp -@@ -3010,7 +3010,7 @@ bool linux_smart_interface::scan_smart_devices(smart_device_list & devlist, - #ifdef WITH_NVME_DEVICESCAN // TODO: Remove when NVMe support is no longer EXPERIMENTAL - bool scan_nvme = (!*type || !strcmp(type, "nvme")); - #else -- bool scan_nvme = ( !strcmp(type, "nvme")); -+ bool scan_nvme = (type && !strcmp(type, "nvme")); - #endif - - if (!(scan_ata || scan_scsi || scan_nvme)) { -diff --git a/smartmontools/os_netbsd.cpp b/smartmontools/os_netbsd.cpp -index 4320cc47..4f8b2cbf 100644 ---- a/smartmontools/os_netbsd.cpp -+++ b/smartmontools/os_netbsd.cpp -@@ -754,7 +754,7 @@ bool netbsd_smart_interface::scan_smart_devices(smart_device_list & devlist, - #ifdef WITH_NVME_DEVICESCAN // TODO: Remove when NVMe support is no longer EXPERIMENTAL - bool scan_nvme = !*type || !strcmp(type, "nvme"); - #else -- bool scan_nvme = !strcmp(type, "nvme"); -+ bool scan_nvme = type && !strcmp(type, "nvme"); - #endif - - // Make namelists --- -2.19.1 - diff --git a/6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch b/6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch deleted file mode 100644 index a64fccdd9187246d71482993494ba16565451ce4..0000000000000000000000000000000000000000 --- a/6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a53a5e1ca98472c32b8f7b91cd69bdd5dfc6c309 Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Wed, 8 Nov 2017 06:30:44 +0000 -Subject: [PATCH 009/291] ataprint.cpp: Fix detection of Device Statistics log - with 256 sectors (#922). - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4604 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 3 +++ - smartmontools/ataprint.cpp | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/smartmontools/ataprint.cpp b/smartmontools/ataprint.cpp -index df42351d..b2f22681 100644 ---- a/smartmontools/ataprint.cpp -+++ b/smartmontools/ataprint.cpp -@@ -3687,7 +3687,7 @@ int ataPrintMain (ata_device * device, const ata_print_options & options) - bool use_gplog = true; - unsigned nsectors = 0; - if (gplogdir) -- nsectors = GetNumLogSectors(gplogdir, 0x04, false); -+ nsectors = GetNumLogSectors(gplogdir, 0x04, true); - else if (smartlogdir){ // for systems without ATA_READ_LOG_EXT - nsectors = GetNumLogSectors(smartlogdir, 0x04, false); - use_gplog = false; --- -2.19.1 - diff --git a/6002-drivedb.h.patch b/6002-drivedb.h.patch deleted file mode 100644 index cc173c83e5d38c6523997960f16e93bdd7ee2097..0000000000000000000000000000000000000000 --- a/6002-drivedb.h.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 60bb2ca697b89285fcba4f011039808eb475f622 Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Mon, 13 Nov 2017 20:47:34 +0000 -Subject: [PATCH 017/291] drivedb.h: - Western Digital Red: WD80EZZX - USB: WD - My Book (0x1058:0x25ee) (Redhat Bugzilla 1446533) - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4612 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 6 ++++++ - smartmontools/drivedb.h | 7 ++++--- - 2 files changed, 10 insertions(+), 3 deletions(-) - -diff --git a/smartmontools/drivedb.h b/smartmontools/drivedb.h -index d81c0b79..cc42f667 100644 ---- a/smartmontools/drivedb.h -+++ b/smartmontools/drivedb.h -@@ -3798,7 +3798,8 @@ const drive_settings builtin_knowndrives[] = { - // WDC WD10JFCX-68N6GN0/01.01A01, WDC WD40EFRX-68WT0N0/80.00A80, - // WDC WD60EFRX-68MYMN1/82.00A82, WDC WD80EFAX-68LHPN0/83.H0A83, - // WDC WD80EFZX-68UW8N0/83.H0A83 -- "WDC WD(7500BFC|10JFC|[1-6]0EFR|80EF[AZ])X-.*", -+ // WDC WD80EZZX-11CSGA0/83.H0A03 (My Book 0x1058:0x25ee) -+ "WDC WD(7500BFC|10JFC|[1-6]0EFR|80E[FZ][AZ])X-.*", - "", "", - "-v 22,raw48,Helium_Level" // WD80EFZX - }, -@@ -4739,10 +4740,10 @@ const drive_settings builtin_knowndrives[] = { - "-d sat" - }, - { "USB: WD My Book / Easystore; ", // 3.5" -- "0x1058:0x(09(0[06]|10)|11(0[01245]|1[0d]|30|40)|1230|25(a3|fb))", -+ "0x1058:0x(09(0[06]|10)|11(0[01245]|1[0d]|30|40)|1230|25(a3|ee|fb))", - "", // 0x0906=0x0012, 10=0x0106 - // 0x1100/01=0x0165, 02=0x1028, 10=0x1030, 1d=0x1020, 30=0x1012, 40=0x1003 -- // 0x1230=0x1065, 0x25a3=0x1013, 0x25fb=0x3004 -+ // 0x1230=0x1065, 0x25a3=0x1013, 0x25ee=0x4004, 0x25fb=0x3004 - "", - "-d sat" - }, --- -2.19.1 - diff --git a/6003-update-smart-drivedb.in-Include-configured-PATH-in-h.patch b/6003-update-smart-drivedb.in-Include-configured-PATH-in-h.patch deleted file mode 100644 index 0d2b2c38a75506e939767af373142e0c6df04427..0000000000000000000000000000000000000000 --- a/6003-update-smart-drivedb.in-Include-configured-PATH-in-h.patch +++ /dev/null @@ -1,87 +0,0 @@ -From d80b89acbcbf619f81410db4b3f9e0a7149cae1e Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Thu, 16 Nov 2017 21:06:57 +0000 -Subject: [PATCH 026/291] update-smart-drivedb.in: Include configured PATH in - help and error messages. - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4622 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 3 +++ - smartmontools/update-smart-drivedb.in | 22 ++++++++++++++++++---- - 2 files changed, 21 insertions(+), 4 deletions(-) - -diff --git a/smartmontools/update-smart-drivedb.in b/smartmontools/update-smart-drivedb.in -index aa23437a..44dd4718 100644 ---- a/smartmontools/update-smart-drivedb.in -+++ b/smartmontools/update-smart-drivedb.in -@@ -45,10 +45,16 @@ GPG="@gnupg@" - # Smartctl used for syntax check - SMARTCTL="$sbindir/smartctl" - -+# PATH information for help and error messages -+@ENABLE_SCRIPTPATH_FALSE@pathinfo='$PATH' -+@ENABLE_SCRIPTPATH_TRUE@pathinfo="'$PATH'" -+ - myname=$0 - - usage() - { -+@ENABLE_SCRIPTPATH_TRUE@ pathinfo=" -+@ENABLE_SCRIPTPATH_TRUE@ $pathinfo" - cat <&2 -@@ -410,7 +424,7 @@ if [ -z "$tool" ]; then - break - fi - done -- test -n "$tool" || error "found none of: $os_dltools" -+ test -n "$tool" || error "found none of '$os_dltools' in $pathinfo" - fi - - test -n "$url" || selecturl "svn" -@@ -435,7 +449,7 @@ esac - # Check for smartctl - if [ "$smtctl" != "-" ]; then - "$smtctl" -V >/dev/null 2>&1 \ -- || error "$smtctl: not found ('-s -' to ignore)" -+ || err_notfound "$smtctl" "('-s -' to ignore)" - fi - - # Check for GnuPG -@@ -443,7 +457,7 @@ if [ -z "$no_verify" ]; then - test -n "$GPG" \ - || error "GnuPG is not available ('--no-verify' to ignore)" - "$GPG" --version >/dev/null 2>&1 \ -- || error "$GPG: not found ('--no-verify' to ignore)" -+ || err_notfound "$GPG" "('--no-verify' to ignore)" - fi - - # Use destination directory as temp directory for gpg --- -2.19.1 - diff --git a/6004-os_linux.cpp-Add-missing-braces-to-3ware-SELinux-cod.patch b/6004-os_linux.cpp-Add-missing-braces-to-3ware-SELinux-cod.patch deleted file mode 100644 index 47b875d81e5d9e14cee37e32797f510d6faf52a7..0000000000000000000000000000000000000000 --- a/6004-os_linux.cpp-Add-missing-braces-to-3ware-SELinux-cod.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 8878751819531b402859ec07d23da745a873092a Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Thu, 16 Nov 2017 21:38:28 +0000 -Subject: [PATCH 028/291] os_linux.cpp: Add missing braces to 3ware SELinux - code. This possibly harmless bug was introduced ~10 years ago in r2510. It is - now detected by g++ 6.3 -Wmisleading-indentation warning. - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4624 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 4 ++++ - smartmontools/os_linux.cpp | 5 +++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp -index a1fb6a7f..51f78b92 100644 ---- a/smartmontools/os_linux.cpp -+++ b/smartmontools/os_linux.cpp -@@ -5,7 +5,7 @@ - * - * Copyright (C) 2003-11 Bruce Allen - * Copyright (C) 2003-11 Doug Gilbert -- * Copyright (C) 2008-16 Christian Franke -+ * Copyright (C) 2008-17 Christian Franke - * - * Original AACRaid code: - * Copyright (C) 2014 Raghava Aditya -@@ -1626,10 +1626,11 @@ static int setup_3ware_nodes(const char *nodename, const char *driver_name) - pout("Error initializing contexts database for /dev"); - if (getfscreatecon(&orig_context) < 0) { - pout("Error retrieving original SELinux fscreate context"); -- if (selinux_enforced) -+ if (selinux_enforced) { - matchpathcon_fini(); - return 6; - } -+ } - } - #endif - /* Now check if nodes are correct */ --- -2.19.1 - diff --git a/6005-drivedb.h-fix-Innolite-Satadom-D150QV-entry-939.patch b/6005-drivedb.h-fix-Innolite-Satadom-D150QV-entry-939.patch deleted file mode 100644 index 337a4da43c87e88fc39c4a13f8a243661d8eaca2..0000000000000000000000000000000000000000 --- a/6005-drivedb.h-fix-Innolite-Satadom-D150QV-entry-939.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 033ec9c2170bb6bb26f7fe67cf05719989e257fe Mon Sep 17 00:00:00 2001 -From: samm-git -Date: Sat, 18 Nov 2017 13:46:44 +0000 -Subject: [PATCH 031/291] drivedb.h: fix Innolite Satadom D150QV entry (#939) - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4627 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 4 +++- - smartmontools/drivedb.h | 13 +++++++------ - 2 files changed, 10 insertions(+), 7 deletions(-) - - -diff --git a/smartmontools/drivedb.h b/smartmontools/drivedb.h -index 1ee92009..d78afab4 100644 ---- a/smartmontools/drivedb.h -+++ b/smartmontools/drivedb.h -@@ -748,8 +748,9 @@ const drive_settings builtin_knowndrives[] = { - //"-v 194,tempminmax,Temperature_Celsius " - "-v 241,raw48,Host_Writes" - }, -- { "InnoDisk InnoLite SATADOM D150QV-L SSDs", // tested with InnoLite SATADOM D150QV-L/120319 -- "InnoLite SATADOM D150QV-L", -+ { "InnoDisk InnoLite SATADOM D150QV SSDs", // tested with InnoLite SATADOM D150QV-L/120319 -+ // InnoLite SATADOM D150QV/120319 -+ "InnoLite SATADOM D150QV.*", - "", "", - //"-v 1,raw48,Raw_Read_Error_Rate " - //"-v 2,raw48,Throughput_Performance " -@@ -757,18 +758,18 @@ const drive_settings builtin_knowndrives[] = { - //"-v 5,raw16(raw16),Reallocated_Sector_Ct " - //"-v 7,raw48,Seek_Error_Rate " // from InnoDisk iSMART Linux tool, useless for SSD - //"-v 8,raw48,Seek_Time_Performance " -- //"-v 9,raw24(raw8),Power_On_Hours " -+ //"-v 9,raw48,Power_On_Hours " - //"-v 10,raw48,Spin_Retry_Count " - //"-v 12,raw48,Power_Cycle_Count " - "-v 168,raw48,SATA_PHY_Error_Count " -- "-v 170,raw48,Bad_Block_Count " -- "-v 173,raw48,Erase_Count " -+ "-v 170,raw16,Bad_Block_Count_New/Tot " -+ "-v 173,raw16,Erase_Count_Max/Avg " - "-v 175,raw48,Bad_Cluster_Table_Count " - "-v 192,raw48,Unexpect_Power_Loss_Ct " - //"-v 194,tempminmax,Temperature_Celsius " - //"-v 197,raw48,Current_Pending_Sector " - "-v 229,hex48,Flash_ID " -- "-v 235,raw48,Later_Bad_Block " -+ "-v 235,raw16,Lat_Bad_Blk_Era/Wri/Rea " - "-v 236,raw48,Unstable_Power_Count " - "-v 240,raw48,Write_Head" - }, --- -2.19.1 - diff --git a/6006-os_freebsd.cpp-on-error-was-setting-set_nvme_err-to-.patch b/6006-os_freebsd.cpp-on-error-was-setting-set_nvme_err-to-.patch deleted file mode 100644 index 7c24617509e7ea2e85b5dcb6f69ea8e43815aba3..0000000000000000000000000000000000000000 --- a/6006-os_freebsd.cpp-on-error-was-setting-set_nvme_err-to-.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 23435e436dca1d54d847df704cd947ef56736e65 Mon Sep 17 00:00:00 2001 -From: dpgilbert -Date: Wed, 27 Dec 2017 05:50:47 +0000 -Subject: [PATCH 073/291] os_freebsd.cpp: on error was setting set_nvme_err() - to 1, fix - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4670 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 5 +++++ - smartmontools/os_freebsd.cpp | 11 ++++++++--- - 2 files changed, 13 insertions(+), 3 deletions(-) - - -diff --git a/smartmontools/os_freebsd.cpp b/smartmontools/os_freebsd.cpp -index 92e225f8..c0bb3b85 100644 ---- a/smartmontools/os_freebsd.cpp -+++ b/smartmontools/os_freebsd.cpp -@@ -519,6 +519,7 @@ bool freebsd_nvme_device::nvme_pass_through(const nvme_cmd_in & in, nvme_cmd_out - { - // nvme_passthru_cmd pt; - struct nvme_pt_command pt; -+ struct nvme_completion *cp_p; - memset(&pt, 0, sizeof(pt)); - - pt.cmd.opc = in.opcode; -@@ -538,10 +539,14 @@ bool freebsd_nvme_device::nvme_pass_through(const nvme_cmd_in & in, nvme_cmd_out - if (status < 0) - return set_err(errno, "NVME_PASSTHROUGH_CMD: %s", strerror(errno)); - -- out.result=pt.cpl.cdw0; // Command specific result (DW0) -+ cp_p = &pt.cpl; -+ out.result=cp_p->cdw0; // Command specific result (DW0) - -- if (nvme_completion_is_error(&pt.cpl)) -- return set_nvme_err(out, nvme_completion_is_error(&pt.cpl)); -+ if (nvme_completion_is_error(cp_p)) { /* ignore DNR and More bits */ -+ uint16_t nvme_status = ((cp_p->status.sct << 8) | cp_p->status.sc) & 0x3ff; -+ -+ return set_nvme_err(out, nvme_status); -+ } - - return true; - } --- -2.19.1 - diff --git a/6007-os_linux.cpp-Fix-device-scan-crash-on-missing-proc-d.patch b/6007-os_linux.cpp-Fix-device-scan-crash-on-missing-proc-d.patch deleted file mode 100644 index 9ec30c9ed88e9ab95a9b47192d3b06885466e05f..0000000000000000000000000000000000000000 --- a/6007-os_linux.cpp-Fix-device-scan-crash-on-missing-proc-d.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3ddb98cebda43e56ba023c5e12306a000a60a707 Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Wed, 28 Mar 2018 19:37:45 +0000 -Subject: [PATCH 124/291] os_linux.cpp: Fix device scan crash on missing - /proc/devices. - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4723 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 2 ++ - smartmontools/os_linux.cpp | 4 +++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp -index 6df97e94..29203409 100644 ---- a/smartmontools/os_linux.cpp -+++ b/smartmontools/os_linux.cpp -@@ -5,7 +5,7 @@ - * - * Copyright (C) 2003-11 Bruce Allen - * Copyright (C) 2003-11 Doug Gilbert -- * Copyright (C) 2008-17 Christian Franke -+ * Copyright (C) 2008-18 Christian Franke - * - * Original AACRaid code: - * Copyright (C) 2014 Raghava Aditya -@@ -2961,6 +2961,8 @@ bool linux_smart_interface::get_dev_megasas(smart_device_list & devlist) - char line[128]; - bool scan_megasas = false; - FILE * fp = fopen("/proc/devices", "r"); -+ if (!fp) -+ return false; - while (fgets(line, sizeof(line), fp) != NULL) { - n1=0; - if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) { --- -2.19.1 - diff --git a/6008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch b/6008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch deleted file mode 100644 index 56fe69128424ff96910ccfffbcb558d76ef75e78..0000000000000000000000000000000000000000 --- a/6008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3e342f88588499b26dbef61a2fe78e9a4838567a Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Wed, 26 Sep 2018 19:44:15 +0000 -Subject: [PATCH 186/291] smartd.cpp: Always ignore failure of ATA SMART ENABLE - command if '-T permissive' is specified. Useful for testing on virtual - machines. - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4790 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 6 ++++++ - smartmontools/smartd.cpp | 12 +++++++++--- - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/smartmontools/smartd.cpp b/smartmontools/smartd.cpp -index 0692ca4d..fc54b233 100644 ---- a/smartmontools/smartd.cpp -+++ b/smartmontools/smartd.cpp -@@ -2037,10 +2037,16 @@ static int ATADeviceScan(dev_config & cfg, dev_state & state, ata_device * atade - PrintOut(LOG_INFO,"Device: %s, could not enable SMART capability\n",name); - - if (ataIsSmartEnabled(&drive) <= 0) { -- CloseDevice(atadev, name); -- return 2; -+ if (!cfg.permissive) { -+ PrintOut(LOG_INFO, "Device: %s, to proceed anyway, use '-T permissive' Directive.\n", name); -+ CloseDevice(atadev, name); -+ return 2; -+ } -+ PrintOut(LOG_INFO, "Device: %s, proceeding since '-T permissive' Directive given.\n", name); -+ } -+ else { -+ PrintOut(LOG_INFO, "Device: %s, proceeding since SMART is already enabled\n", name); - } -- PrintOut(LOG_INFO, "Device: %s, proceeding since SMART is already enabled\n", name); - } - - // disable device attribute autosave... --- -2.19.1 - diff --git a/6009-os_linux.cpp-Fix-d-megaraid-open-crash-on-missing-pr.patch b/6009-os_linux.cpp-Fix-d-megaraid-open-crash-on-missing-pr.patch deleted file mode 100644 index c79da8a5309ef7493102bb6f1e33ade79b5996cc..0000000000000000000000000000000000000000 --- a/6009-os_linux.cpp-Fix-d-megaraid-open-crash-on-missing-pr.patch +++ /dev/null @@ -1,62 +0,0 @@ -From f201d3a068d2bbdc36b89d248b521ba2da3ad741 Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Thu, 11 Oct 2018 18:51:35 +0000 -Subject: [PATCH 204/291] os_linux.cpp: Fix '-d megaraid' open crash on missing - /proc/devices. There is no /proc/devices on ESXi (see #800) and WSL. - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4809 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 5 +++++ - smartmontools/os_linux.cpp | 34 ++++++++++++++++++---------------- - 2 files changed, 23 insertions(+), 16 deletions(-) - -diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp -index 1a1b0858..9790818a 100644 ---- a/smartmontools/os_linux.cpp -+++ b/smartmontools/os_linux.cpp -@@ -1299,24 +1299,26 @@ bool linux_megaraid_device::open() - } - /* Perform mknod of device ioctl node */ - FILE * fp = fopen("/proc/devices", "r"); -- while (fgets(line, sizeof(line), fp) != NULL) { -- int n1 = 0; -- if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) { -- n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR, makedev(mjr, 0)); -- if(report > 0) -- pout("Creating /dev/megaraid_sas_ioctl_node = %d\n", n1 >= 0 ? 0 : errno); -- if (n1 >= 0 || errno == EEXIST) -- break; -- } -- else if (sscanf(line, "%d megadev%n", &mjr, &n1) == 1 && n1 == 11) { -- n1=mknod("/dev/megadev0", S_IFCHR, makedev(mjr, 0)); -- if(report > 0) -- pout("Creating /dev/megadev0 = %d\n", n1 >= 0 ? 0 : errno); -- if (n1 >= 0 || errno == EEXIST) -- break; -+ if (fp) { -+ while (fgets(line, sizeof(line), fp) != NULL) { -+ int n1 = 0; -+ if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) { -+ n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR, makedev(mjr, 0)); -+ if(report > 0) -+ pout("Creating /dev/megaraid_sas_ioctl_node = %d\n", n1 >= 0 ? 0 : errno); -+ if (n1 >= 0 || errno == EEXIST) -+ break; -+ } -+ else if (sscanf(line, "%d megadev%n", &mjr, &n1) == 1 && n1 == 11) { -+ n1=mknod("/dev/megadev0", S_IFCHR, makedev(mjr, 0)); -+ if(report > 0) -+ pout("Creating /dev/megadev0 = %d\n", n1 >= 0 ? 0 : errno); -+ if (n1 >= 0 || errno == EEXIST) -+ break; -+ } - } -+ fclose(fp); - } -- fclose(fp); - - /* Open Device IOCTL node */ - if ((m_fd = ::open("/dev/megaraid_sas_ioctl_node", O_RDWR)) >= 0) { --- -2.19.1 - diff --git a/6010-os_darwin.cpp-os_freebsd.cpp-fix-return-value-in-err.patch b/6010-os_darwin.cpp-os_freebsd.cpp-fix-return-value-in-err.patch deleted file mode 100644 index 5f70a5b343a16c727dc464f9d22e8c55ee8036b3..0000000000000000000000000000000000000000 --- a/6010-os_darwin.cpp-os_freebsd.cpp-fix-return-value-in-err.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 2520e4983eb084cf0b48dded77d358d9f085b9d2 Mon Sep 17 00:00:00 2001 -From: samm-git -Date: Fri, 9 Nov 2018 07:18:23 +0000 -Subject: [PATCH 225/291] os_darwin.cpp, os_freebsd.cpp: fix return value in - error paths - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4831 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 5 +++++ - smartmontools/os_darwin.cpp | 4 ++-- - smartmontools/os_freebsd.cpp | 2 +- - 3 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/smartmontools/os_darwin.cpp b/smartmontools/os_darwin.cpp -index 1620981b..25888047 100644 ---- a/smartmontools/os_darwin.cpp -+++ b/smartmontools/os_darwin.cpp -@@ -403,7 +403,7 @@ bool darwin_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & ou - int rc = 0; - - if (! ifp) -- return -1; -+ return false; - smartIf = *ifp; - clear_err(); errno = 0; - do { -@@ -558,7 +558,7 @@ bool darwin_nvme_device::nvme_pass_through(const nvme_cmd_in & in, nvme_cmd_out - unsigned int page = in.cdw10 & 0xff; - - if (! ifp) -- return -1; -+ return false; - smartIfNVMe = *ifp; - // currently only GetIdentifyData and SMARTReadData are supported - switch (in.opcode) { -diff --git a/smartmontools/os_freebsd.cpp b/smartmontools/os_freebsd.cpp -index 49f82c58..ffe3b151 100644 ---- a/smartmontools/os_freebsd.cpp -+++ b/smartmontools/os_freebsd.cpp -@@ -613,7 +613,7 @@ bool freebsd_escalade_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_ou - - if (m_disknum < 0) { - printwarning(NO_DISK_3WARE,NULL); -- return -1; -+ return false; - } - - memset(ioctl_buffer, 0, TW_IOCTL_BUFFER_SIZE); --- -2.19.1 - diff --git a/6011-ataprint.cpp-Fix-Form-Factor-string-with-bits-set-in.patch b/6011-ataprint.cpp-Fix-Form-Factor-string-with-bits-set-in.patch deleted file mode 100644 index a7a22ce68ff7268f92223ec8eb1d6fce911543f1..0000000000000000000000000000000000000000 --- a/6011-ataprint.cpp-Fix-Form-Factor-string-with-bits-set-in.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 613b1f96b0535563d98376e46ea3ed5ad0252ea7 Mon Sep 17 00:00:00 2001 -From: chrfranke -Date: Sun, 2 Dec 2018 15:46:22 +0000 -Subject: [PATCH 234/291] ataprint.cpp: Fix Form Factor string with bits set in - reserved area - Happens with APPLE SSD SD0256F - -Patch provided by Harry Mallon. - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4841 4ea69e1a-61f1-4043-bf83-b5c94c648137 ---- - smartmontools/ChangeLog | 5 +++++ - smartmontools/ataprint.cpp | 3 ++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/smartmontools/ataprint.cpp b/smartmontools/ataprint.cpp -index 5fccf4ba..495d5401 100644 ---- a/smartmontools/ataprint.cpp -+++ b/smartmontools/ataprint.cpp -@@ -404,9 +404,10 @@ static inline std::string format_st_er_desc( - - static const char * get_form_factor(unsigned short word168) - { -+ // Bits 0:3 are the form factor - // Table A.32 of T13/2161-D (ACS-3) Revision 4p, September 19, 2013 - // Table 236 of T13/BSR INCITS 529 (ACS-4) Revision 04, August 25, 2014 -- switch (word168) { -+ switch (word168 & 0xF) { - case 0x1: return "5.25 inches"; - case 0x2: return "3.5 inches"; - case 0x3: return "2.5 inches"; --- -2.19.1 - diff --git a/smartmontools-6.6.tar.gz b/smartmontools-6.6.tar.gz deleted file mode 100644 index 20e9394dea03de36829d7fcaa09a47584378fc0f..0000000000000000000000000000000000000000 Binary files a/smartmontools-6.6.tar.gz and /dev/null differ diff --git a/smartmontools-7.1.tar.gz b/smartmontools-7.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4e8fec53125ce0769ed44873471ceeedbcfe0129 Binary files /dev/null and b/smartmontools-7.1.tar.gz differ diff --git a/smartmontools.spec b/smartmontools.spec index 0edc2900cfb4d4f2dd2106ba454859cf1da782aa..91526aacfbc5db33fb3421e4e068bab885c85f05 100644 --- a/smartmontools.spec +++ b/smartmontools.spec @@ -1,6 +1,6 @@ Name: smartmontools -Version: 6.6 -Release: 8 +Version: 7.1 +Release: 1 Epoch: 1 Summary: S.M.A.R.T. utility toolset License: GPLv2+ @@ -9,21 +9,8 @@ URL: http://smartmontools.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: smartmontools.sysconf -Patch6000: 6000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch -Patch6001: 6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch -Patch6002: 6002-drivedb.h.patch -Patch6003: 6003-update-smart-drivedb.in-Include-configured-PATH-in-h.patch -Patch6004: 6004-os_linux.cpp-Add-missing-braces-to-3ware-SELinux-cod.patch -Patch6005: 6005-drivedb.h-fix-Innolite-Satadom-D150QV-entry-939.patch -Patch6006: 6006-os_freebsd.cpp-on-error-was-setting-set_nvme_err-to-.patch -Patch6007: 6007-os_linux.cpp-Fix-device-scan-crash-on-missing-proc-d.patch -Patch6008: 6008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch -Patch6009: 6009-os_linux.cpp-Fix-d-megaraid-open-crash-on-missing-pr.patch -Patch6010: 6010-os_darwin.cpp-os_freebsd.cpp-fix-return-value-in-err.patch -Patch6011: 6011-ataprint.cpp-Fix-Form-Factor-string-with-bits-set-in.patch - BuildRequires: groff gcc-c++ automake -BuildRequires: libselinux-devel libcap-ng-devel systemd-units +BuildRequires: libselinux-devel libcap-ng-devel systemd systemd-units systemd-devel Requires(preun): systemd-units Requires(post): systemd-units @@ -54,7 +41,7 @@ This contains man files for the using of smartmontools. %build autoreconf -i -%configure --with-selinux --with-libcap-ng=yes --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%{name}/ +%configure --with-selinux --with-libcap-ng=yes --with-libsystemd --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%{name}/ --with-systemdenvfile=%{_sysconfdir}/sysconfig/%{name} make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now" sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' smartd.service @@ -93,6 +80,12 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name} %changelog +* Thu Apr 16 2020 wangjufeng - 1:7.1-1 +- Type:enhancemnet +- ID:NA +- SUG:NA +- DESC:R + * Fri Jan 17 2020 openEuler Buildteam - 1:6.6-8 - Type:bugfix - ID:NA