summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-11-06 08:07:32 -0500
committerjim-p <jimp@pfsense.org>2014-11-06 08:07:32 -0500
commit10435fa9f7100865858e7f208752c03d6b5a4984 (patch)
treec54211e33003c9ff6dc60fade95ea272ec8ba058
parent3f6525c1ab0fd3f704ab8e23f935c475c3cbd16c (diff)
parenta68c678580a210a05c80873bfbdf58a703372b80 (diff)
downloadpfsense-10435fa9f7100865858e7f208752c03d6b5a4984.zip
pfsense-10435fa9f7100865858e7f208752c03d6b5a4984.tar.gz
Merge pull request #1330 from phil-davis/patch-1
-rw-r--r--etc/inc/util.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index dd6a818..e15cdd7 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -2080,7 +2080,8 @@ function get_smart_drive_list() {
$disk_list = explode(" ", get_single_sysctl("kern.disks"));
foreach ($disk_list as $id => $disk) {
// We only want certain kinds of disks for S.M.A.R.T.
- if (preg_match("/^(ad|da|ada).*[0-9]{1,2}$/", $disk) === FALSE) {
+ // 1 is a match, 0 is no match, False is any problem processing the regex
+ if (preg_match("/^(ad|da|ada).*[0-9]{1,2}$/", $disk) !== 1) {
unset($disk_list[$id]);
}
}
OpenPOWER on IntegriCloud