From patchwork Tue Apr 12 17:54:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 701521 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3CHsXuQ009936 for ; Tue, 12 Apr 2011 17:54:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755705Ab1DLRyV (ORCPT ); Tue, 12 Apr 2011 13:54:21 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:39627 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754725Ab1DLRyU (ORCPT ); Tue, 12 Apr 2011 13:54:20 -0400 Received: by wwa36 with SMTP id 36so8203154wwa.1 for ; Tue, 12 Apr 2011 10:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=CvrvsRrV3QD0V1oHAXkU73dPOdLrw26oYwpbUzxiRko=; b=GluV4ELIEJ9hQeEq7dyHqgpl9acvC31CjgVs6u0zVEqqNdXBUCSgBBd3+aFsqnuJHM whE8Deg0eu6RulzzykUCfkNIAO3MDwRgDrNYbhylPNAsXZKUkFA1zFw1C+LHuD3yS8iR bYhEN6jVuPsHRdKdhiMQKFg3HBAxlEZZtX0kE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=wkznKFdj30hwwwKVF4mv4+8Z4ST7K7vz4F7E++YHuLMfM09lIfFwiAZfqdxPHbkRMx 1NyzCN2i2Uiw/gzIBy8KCZQL1vKPDMJ/qx9RdtX4pG6wRtl3tYavcRlmgrYG9XnDy56Q YYEwfU64laXH1qoSz+mMH9X7hje4jb4TgH3rM= Received: by 10.227.58.72 with SMTP id f8mr4487896wbh.181.1302630859272; Tue, 12 Apr 2011 10:54:19 -0700 (PDT) Received: from localhost.localdomain ([94.230.81.151]) by mx.google.com with ESMTPS id o23sm4184823wbc.44.2011.04.12.10.54.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Apr 2011 10:54:18 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org Cc: kvm@vger.kernel.org, Sasha Levin Subject: [PATCH 1/2] kvm tools: Add OPT_GROUP to cmdline parser Date: Tue, 12 Apr 2011 20:54:10 +0300 Message-Id: <1302630851-19440-1-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.5.rc1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 12 Apr 2011 17:54:34 +0000 (UTC) Add the OPT_GROUP parser option to allow the creation of an organized help menu. Used code taken from the git project. Signed-off-by: Sasha Levin --- tools/kvm/include/kvm/parse-options.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/parse-options.h b/tools/kvm/include/kvm/parse-options.h index b59220d..5d8c618 100644 --- a/tools/kvm/include/kvm/parse-options.h +++ b/tools/kvm/include/kvm/parse-options.h @@ -132,6 +132,12 @@ intptr_t defval; .help = (h) \ } +#define OPT_GROUP(h) \ +{ \ + .type = OPTION_GROUP, \ + .help = (h) \ +} + #define OPT_END() { .type = OPTION_END } enum {