blob: 4a9774201d4137da4e3803c1fcbd2722ad5e70c4 [file] [log] [blame]
Cosmos Nicolaou8feb3062014-08-19 17:09:40 -07001// +build linux,!arm
Cosmos Nicolaou98698072014-08-19 16:44:53 -07002
3package profiles
4
5// str converts the input byte slice to a string, ignoring everything following
6// a null character (including the null character).
7func utsStr(c []int8) string {
8 ret := make([]byte, 0, len(c))
9 for _, v := range c {
10 if v == 0 {
11 break
12 }
13 ret = append(ret, byte(v))
14 }
15 return string(ret)
16}