Strip WWN part from disk identifier (if present)

This commit is contained in:
bergware
2016-08-29 13:35:11 +02:00
parent 6ad69f9d9f
commit b82a915e94
+1 -1
View File
@@ -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;