We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b56199 commit dbfa243Copy full SHA for dbfa243
cmd/gpu_fakedev/gpu_fakedev.go
@@ -374,19 +374,8 @@ func saveSideCarFile(connections string) {
374
}
375
defer f.Close()
376
377
- if len(connections) <= maxK8sLabelSize {
378
- line := fmt.Sprintf("xpumanager.intel.com/xe-links=%s", connections)
379
- fmt.Println(line)
380
-
381
- if _, err := f.WriteString(line + "\n"); err != nil {
382
- panic(err)
383
- }
384
385
- return
386
387
388
// Write first line without Z prefix
389
- line := fmt.Sprintf("xpumanager.intel.com/xe-links=%s", connections[:maxK8sLabelSize])
+ line := fmt.Sprintf("xpumanager.intel.com/xe-links=%s", connections[:min(len(connections), maxK8sLabelSize)])
390
fmt.Println(line)
391
392
if _, err := f.WriteString(line + "\n"); err != nil {
0 commit comments