(t configs.NamespaceType)
| 188 | } |
| 189 | |
| 190 | func criuNsToKey(t configs.NamespaceType) string { |
| 191 | // Construct "extRoot" + capitalize(nsName) + "NS" without allocations. |
| 192 | // Result format: "extRootNetNS", "extRootPidNS", etc. |
| 193 | nsName := configs.NsName(t) |
| 194 | out := make([]byte, 0, 32) |
| 195 | out = append(out, "extRoot"...) |
| 196 | // Capitalize the first character (this assumes it's in the a-z range). |
| 197 | if len(nsName) > 0 { |
| 198 | out = append(out, byte(unicode.ToUpper(rune(nsName[0])))) |
| 199 | out = append(out, nsName[1:]...) |
| 200 | } |
| 201 | out = append(out, "NS"...) |
| 202 | |
| 203 | return string(out) |
| 204 | } |
| 205 | |
| 206 | func (c *Container) handleCheckpointingExternalNamespaces(rpcOpts *criurpc.CriuOpts, t configs.NamespaceType) error { |
| 207 | if !c.criuSupportsExtNS(t) { |
no test coverage detected
searching dependent graphs…