From 5320b665c6ab478d34bd97985fb47dd9be478e14 Mon Sep 17 00:00:00 2001 From: Markeryang <747675909@qq.com> Date: Thu, 16 Jul 2020 20:09:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=200008-sma?= =?UTF-8?q?rtd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s-ignore-failure-of-ATA-SMART-ENABLE.patch | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 0008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch diff --git a/0008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch b/0008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch deleted file mode 100644 index 56fe691..0000000 --- a/0008-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 -