Skip to content

Commit 7756908

Browse files
authored
Merge pull request #2605 from SimonFair/fix-sdap-for-pools-status
fix(Poolstatus): fix regex.
2 parents 16bff4a + d2e4b69 commit 7756908

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

emhttp/plugins/dynamix/include/Helpers.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,12 +1247,8 @@ function normalize_pool_member_device(string $devicePath): string
12471247
return preg_replace('/p\d+$/', '', $devicePath);
12481248
}
12491249

1250-
if (preg_match('/^(sd[a-z]+|hd[a-z]+|vd[a-z]+|xvd[a-z]+|ubd[a-z]+)p\d+$/', $devicePath, $m)) {
1251-
return $m[1];
1252-
}
1253-
1254-
if (preg_match('/^(sd[a-z]+|hd[a-z]+|vd[a-z]+|xvd[a-z]+|ubd[a-z]+)\d+$/', $devicePath, $m)) {
1255-
return $m[1];
1250+
if (preg_match('/^(sd|hd|vd|xvd|ubd)([a-z]+)(\d+)$/', $devicePath, $m)) {
1251+
return $m[1].$m[2];
12561252
}
12571253

12581254
return $devicePath;

0 commit comments

Comments
 (0)