Commit-ID: fa7449fb76d8ec985a5847609c0dd3b5d754607b Gitweb: http://git.kernel.org/tip/fa7449fb76d8ec985a5847609c0dd3b5d754607b Author: Michael Ellerman <michael@xxxxxxxxxxxxxx> AuthorDate: Fri, 10 Aug 2012 15:38:52 +1000 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Mon, 13 Aug 2012 10:29:09 +0300 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@xxxxxxxxx> Signed-off-by: Michael Ellerman <michael@xxxxxxxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/builtin-run.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index a36bd00..9e5c1d4 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -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; } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html