mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.4.0 -> release/2.5.0
* commit '6ec91d6f4dd6ebf539369987fd829738bb6c0cbf': 识别新版vmdk
This commit is contained in:
@@ -24,7 +24,9 @@ type SVMDKInfo struct {
|
||||
}
|
||||
|
||||
const (
|
||||
extentPatternString = `^RW \d+ VMFS\w* \"(?P<fn>[^"]+)`
|
||||
//RW 20971520 VMFS "89334fec-7013-46cb-8d7b-8271cbe1a175_1-flat.vmdk"
|
||||
//RW 62914560 SESPARSE "89334fec-7013-46cb-8d7b-8271cbe1a175-sesparse.vmdk"
|
||||
extentPatternString = `^RW \d+ (VMFS|SESPARSE)\w* \"(?P<fn>[^"]+)`
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -44,7 +46,7 @@ func ParseStream(stream io.Reader) (*SVMDKInfo, error) {
|
||||
matches := extentPatternRegexp.FindStringSubmatch(line)
|
||||
if len(matches) > 0 {
|
||||
// log.Debugf("%#v", matches)
|
||||
info.ExtentFile = matches[1]
|
||||
info.ExtentFile = matches[2]
|
||||
findExtent = true
|
||||
} else {
|
||||
equalPos := strings.IndexByte(line, '=')
|
||||
|
||||
Reference in New Issue
Block a user