From patchwork Wed Mar 30 22:55:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 8705511 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E67F1C0553 for ; Wed, 30 Mar 2016 22:55:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5410420376 for ; Wed, 30 Mar 2016 22:55:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54AF620374 for ; Wed, 30 Mar 2016 22:55:40 +0000 (UTC) Received: from localhost ([::1]:57108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alP1X-0002Jb-N8 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 30 Mar 2016 18:55:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alP1M-0002Iy-3E for qemu-devel@nongnu.org; Wed, 30 Mar 2016 18:55:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alP1I-0007LK-Kh for qemu-devel@nongnu.org; Wed, 30 Mar 2016 18:55:27 -0400 Received: from sonata.ens-lyon.org ([140.77.166.138]:51728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alP1I-0007L9-Dz for qemu-devel@nongnu.org; Wed, 30 Mar 2016 18:55:24 -0400 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 76F1920113; Thu, 31 Mar 2016 00:55:22 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zYB1wcO2haiN; Thu, 31 Mar 2016 00:55:22 +0200 (CEST) Received: from var.youpi.perso.aquilenet.fr (LFbn-1-6757-94.w90-120.abo.wanadoo.fr [90.120.189.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 49CC120111; Thu, 31 Mar 2016 00:55:22 +0200 (CEST) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.87) (envelope-from ) id 1alP1F-00033W-Cu; Thu, 31 Mar 2016 00:55:21 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org Date: Thu, 31 Mar 2016 00:55:18 +0200 Message-Id: <1459378518-11709-1-git-send-email-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.8.0.rc3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 140.77.166.138 Cc: Samuel Thibault , thuth@redhat.com, jasowang@redhat.com, peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH] Fix ipv6 options according to documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The options names were fixed in the qapi layer, but not in the command-line options. Signed-off-by: Samuel Thibault Reviewed-by: Eric Blake --- net/net.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/net.c b/net/net.c index 3b5a142..594c3b8 100644 --- a/net/net.c +++ b/net/net.c @@ -1054,32 +1054,32 @@ int net_client_init(QemuOpts *opts, int is_netdev, Error **errp) { /* Parse convenience option format ip6-net=fec0::0[/64] */ - const char *ip6_net = qemu_opt_get(opts, "ip6-net"); + const char *ip6_net = qemu_opt_get(opts, "ipv6-net"); if (ip6_net) { char buf[strlen(ip6_net) + 1]; if (get_str_sep(buf, sizeof(buf), &ip6_net, '/') < 0) { /* Default 64bit prefix length. */ - qemu_opt_set(opts, "ip6-prefix", ip6_net, &error_abort); - qemu_opt_set_number(opts, "ip6-prefixlen", 64, &error_abort); + qemu_opt_set(opts, "ipv6-prefix", ip6_net, &error_abort); + qemu_opt_set_number(opts, "ipv6-prefixlen", 64, &error_abort); } else { /* User-specified prefix length. */ unsigned long len; int err; - qemu_opt_set(opts, "ip6-prefix", buf, &error_abort); + qemu_opt_set(opts, "ipv6-prefix", buf, &error_abort); err = qemu_strtoul(ip6_net, NULL, 10, &len); if (err) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "ip6-prefix", "a number"); + "ipv6-prefix", "a number"); } else { - qemu_opt_set_number(opts, "ip6-prefixlen", len, + qemu_opt_set_number(opts, "ipv6-prefixlen", len, &error_abort); } } - qemu_opt_unset(opts, "ip6-net"); + qemu_opt_unset(opts, "ipv6-net"); } }