We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 16bff4a + d2e4b69 commit 7756908Copy full SHA for 7756908
1 file changed
emhttp/plugins/dynamix/include/Helpers.php
@@ -1247,12 +1247,8 @@ function normalize_pool_member_device(string $devicePath): string
1247
return preg_replace('/p\d+$/', '', $devicePath);
1248
}
1249
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
+ if (preg_match('/^(sd|hd|vd|xvd|ubd)([a-z]+)(\d+)$/', $devicePath, $m)) {
+ return $m[1].$m[2];
1256
1257
1258
return $devicePath;
0 commit comments