From patchwork Thu Mar 23 10:55:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 742604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vpk4y3Y57z9s06 for ; Thu, 23 Mar 2017 21:56:34 +1100 (AEDT) Received: from localhost ([::1]:55481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cr0Pv-0006si-P9 for incoming@patchwork.ozlabs.org; Thu, 23 Mar 2017 06:56:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cr0PL-0006rp-5e for qemu-devel@nongnu.org; Thu, 23 Mar 2017 06:55:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cr0PH-0005ik-Sf for qemu-devel@nongnu.org; Thu, 23 Mar 2017 06:55:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43196) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cr0PH-0005iO-ME for qemu-devel@nongnu.org; Thu, 23 Mar 2017 06:55:51 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9226AC04B93D for ; Thu, 23 Mar 2017 10:55:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9226AC04B93D Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=armbru@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9226AC04B93D Received: from blackfin.pond.sub.org (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 423AE19625; Thu, 23 Mar 2017 10:55:51 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A5DCC11386CB; Thu, 23 Mar 2017 11:55:48 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 23 Mar 2017 11:55:47 +0100 Message-Id: <1490266548-22500-5-git-send-email-armbru@redhat.com> In-Reply-To: <1490266548-22500-1-git-send-email-armbru@redhat.com> References: <1490266548-22500-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 23 Mar 2017 10:55:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.9 4/5] rbd: Peel off redundant RbdAuthMethod wrapper struct X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, jdurgin@redhat.com, jcody@redhat.com, mreitz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" BlockdevOptionsRbd member auth-supported is a list of struct RbdAuthMethod, whose only member is enum RbdAuthSupport. There is no reason for wrapping the enum in a struct. Delete the wrapper, and rename the enum. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- block/rbd.c | 2 +- qapi/block-core.json | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 8ba0f79..f460d71 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -566,7 +566,7 @@ static char *rbd_auth(QDict *options) int i; for (i = 0;; i++) { - sprintf(keybuf, "auth-supported.%d.auth", i); + sprintf(keybuf, "auth-supported.%d", i); val = qdict_get(options, keybuf); if (!val) { break; diff --git a/qapi/block-core.json b/qapi/block-core.json index 0f132fc..fe1e40f 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2601,25 +2601,14 @@ ## -# @RbdAuthSupport: -# -# An enumeration of RBD auth support -# -# Since: 2.9 -## -{ 'enum': 'RbdAuthSupport', - 'data': [ 'cephx', 'none' ] } - - -## # @RbdAuthMethod: # # An enumeration of rados auth_supported types # # Since: 2.9 ## -{ 'struct': 'RbdAuthMethod', - 'data': { 'auth': 'RbdAuthSupport' } } +{ 'enum': 'RbdAuthMethod', + 'data': [ 'cephx', 'none' ] } ## # @BlockdevOptionsRbd: