+checklocks:l.mu
(spec *specs.Spec, cid string)
| 2203 | |
| 2204 | // +checklocks:l.mu |
| 2205 | func (l *Loader) registerContainerLocked(spec *specs.Spec, cid string) string { |
| 2206 | containerName := specutils.ContainerName(spec) |
| 2207 | if len(containerName) == 0 { |
| 2208 | // If no name was provided, require containers to be restored in the same order |
| 2209 | // they were created. |
| 2210 | containerName = "__no_name_" + strconv.Itoa(len(l.containerIDs)) |
| 2211 | } |
| 2212 | |
| 2213 | l.containerIDs[containerName] = cid |
| 2214 | l.containerSpecs[containerName] = spec |
| 2215 | return containerName |
| 2216 | } |
| 2217 | |
| 2218 | func (l *Loader) getContainerSpec(containerName string) *specs.Spec { |
| 2219 | l.mu.Lock() |
no test coverage detected