parseTainted builds a KernelTainted from the raw taint bitmask value.
(value uint64)
| 82 | |
| 83 | // parseTainted builds a KernelTainted from the raw taint bitmask value. |
| 84 | func parseTainted(value uint64) KernelTainted { |
| 85 | bits := make([]KernelTaintBit, len(kernelTaintBitDefs)) |
| 86 | for i, def := range kernelTaintBitDefs { |
| 87 | bits[i] = KernelTaintBit{ |
| 88 | Index: i, |
| 89 | Flag: def.flag, |
| 90 | Description: def.description, |
| 91 | Set: value&(1<<uint(i)) != 0, |
| 92 | } |
| 93 | } |
| 94 | return KernelTainted{Value: value, Bits: bits} |
| 95 | } |
no outgoing calls