Trim null bytes from kernel version
This commit is contained in:
parent
8a5bcfdb53
commit
62a406ec1b
|
@ -380,7 +380,7 @@ func KernelVersionWithContext(ctx context.Context) (version string, err error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(utsname.Release[:]), nil
|
||||
return string(utsname.Release[:bytes.IndexByte(utsname.Release[:], 0)]), nil
|
||||
}
|
||||
|
||||
func getSlackwareVersion(contents []string) string {
|
||||
|
|
Loading…
Reference in New Issue