From 844cf94f009107e9d525a6f4fcff3beb511956ad Mon Sep 17 00:00:00 2001 From: bergware Date: Mon, 29 Aug 2016 13:36:56 +0200 Subject: [PATCH] Strip WWN part from disk identifier (if present) --- plugins/dynamix/include/DeviceList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/include/DeviceList.php b/plugins/dynamix/include/DeviceList.php index eadf22de9..ca104dd55 100644 --- a/plugins/dynamix/include/DeviceList.php +++ b/plugins/dynamix/include/DeviceList.php @@ -68,7 +68,7 @@ function device_browse(&$disk) { function device_id($id) { $len = strlen($id); $wwn = substr($id,-18); - return (substr($wwn,0,2)!='_3' || preg_match('/.(_|-)/',$wwn)) ? $id : substr($id,0,$len-18); + return (substr($wwn,0,2)!='_3' || preg_match('/.[_-]/',$wwn)) ? $id : substr($id,0,$len-18); } function device_desc(&$disk) { global $var;