mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 20:51:28 +00:00
kvm tools: Check for unknown parameters in network option handling
Currently the parsing of network command line parameters doesn't check for unknown parameters. For example "-n mod=none" will cause kvmtool to setup TAP networking. Save users from their typos by checking for unknown parameters and bailing. Acked-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
db05112725
commit
21aa628e28
+2
-1
@@ -257,7 +257,8 @@ static int set_net_param(struct virtio_net_params *p, const char *param,
|
||||
p->vhost = atoi(val);
|
||||
} else if (strcmp(param, "fd") == 0) {
|
||||
p->fd = atoi(val);
|
||||
}
|
||||
} else
|
||||
die("Unknown network parameter %s", param);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user