Automatic merge from release/2.4.0 -> release/2.5.0

* commit '6ec91d6f4dd6ebf539369987fd829738bb6c0cbf':
  识别新版vmdk
This commit is contained in:
邱剑
2019-02-19 17:34:30 +08:00
+4 -2
View File
@@ -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, '=')