MCPcopy Create free account
hub / github.com/prometheus/procfs / parseTainted

Function parseTainted

kernel_tainted.go:84–95  ·  view source on GitHub ↗

parseTainted builds a KernelTainted from the raw taint bitmask value.

(value uint64)

Source from the content-addressed store, hash-verified

82
83// parseTainted builds a KernelTainted from the raw taint bitmask value.
84func 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}

Callers 2

TestParseTaintedFunction · 0.85
KernelTaintedMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestParseTaintedFunction · 0.68