删除文件 0008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch
This commit is contained in:
parent
7ddfebfe80
commit
5320b665c6
@ -1,40 +0,0 @@
|
||||
From 3e342f88588499b26dbef61a2fe78e9a4838567a Mon Sep 17 00:00:00 2001
|
||||
From: chrfranke <authors@smartmontools.org>
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user