Skip to content

Commit 524a4ac

Browse files
committed
Fix NIC name validation format string corruption
Signed-off-by: Jan Dubois <[email protected]>
1 parent 48e44a2 commit 524a4ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/limayaml/validate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ func Validate(y LimaYAML) error {
194194
}
195195
// FillDefault() will make sure that vde.Name is not the empty string
196196
if len(vde.Name) >= 16 {
197-
return errors.Errorf("field `%s.be less than 16 bytes, but is %d bytes: %q", field, len(vde.Name), vde.Name)
197+
return errors.Errorf("field `%s.name` must be less than 16 bytes, but is %d bytes: %q", field, len(vde.Name), vde.Name)
198198
}
199199
if strings.ContainsAny(vde.Name, " \t\n/") {
200-
return errors.Errorf("field `%s.be must not contain whitespace or slashes", field)
200+
return errors.Errorf("field `%s.name` must not contain whitespace or slashes", field)
201201
}
202202
if vde.Name == qemuconst.SlirpNICName {
203203
return errors.Errorf("field `%s.name` must not be set to %q because it is reserved for slirp", field, qemuconst.SlirpNICName)

0 commit comments

Comments
 (0)