From ab882da03b57037885c4222f474fa8bd37a01956 Mon Sep 17 00:00:00 2001 From: Mohit Soni Date: Fri, 23 Aug 2013 14:37:37 -0700 Subject: [PATCH] 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 '.'. --- utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index 6a5beb8e48..69d300e282 100644 --- a/utils/utils.go +++ b/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])