소스 검색

Fixes #1643

Changed the split statement, from SplitN to Split. Doing so takes
care of cases, when a minor version is followed by a suffix, that
starts with '.'.
Mohit Soni 12 년 전
부모
커밋
ab882da03b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      utils/utils.go

+ 1 - 1
utils/utils.go

@@ -537,7 +537,7 @@ func GetKernelVersion() (*KernelVersionInfo, error) {
 	release = release[:bytes.IndexByte(release, 0)]
 
 	tmp := strings.SplitN(string(release), "-", 2)
-	tmp2 := strings.SplitN(tmp[0], ".", 3)
+	tmp2 := strings.Split(tmp[0], ".")
 
 	if len(tmp2) > 0 {
 		kernel, err = strconv.Atoi(tmp2[0])