From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE456C4363A for ; Thu, 29 Oct 2020 01:00:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 748EA20791 for ; Thu, 29 Oct 2020 01:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603933240; bh=bhTM3oQEf2DyoKX7p90cruJ74AOlutupXUzBp7NKm0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nftQa7H16pyDPyFbC+FyZXB/2tvLaJdq6zYjMxbu2o0lYkCfp7b0S//ZXGKNIwPU5 FUwnXsO776czG/0AY6YY2jDZ+8IJmsih+mv3IWi4HvGslojcGOyb6e+nfbd6/w1JeU Pk6yBbr3qDm0VlsCJiO4hnQ+uyHklr8Nu572RlQE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404038AbgJ2BAi (ORCPT ); Wed, 28 Oct 2020 21:00:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731543AbgJ1WR2 (ORCPT ); Wed, 28 Oct 2020 18:17:28 -0400 Received: from mail.kernel.org (ip5f5ad5b2.dynamic.kabel-deutschland.de [95.90.213.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2D5732479F; Wed, 28 Oct 2020 14:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603895015; bh=bhTM3oQEf2DyoKX7p90cruJ74AOlutupXUzBp7NKm0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lqWzQ12Taf7trcJ2RB8j7pse058el+vyE9LvSXQYyvZ6OK3aVRCp9s5VlnD54o8yH QWGphusLXUMk0xm2iKwaz/SjsdV20hRV+3eKrjtMyIFrSRSagmtY8YhxOE9FJNDvwV Rj7AUo3dDCDsm3ltktNKiAqqb6CSCyvsJWTQ7EGE= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kXmMP-003hlj-7t; Wed, 28 Oct 2020 15:23:33 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH 21/33] docs: ABI: make it parse ABI/stable as ReST-compatible files Date: Wed, 28 Oct 2020 15:23:19 +0100 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mauro Carvalho Chehab Now that the stable ABI files are compatible with ReST, parse them without converting complex descriptions as literal blocks nor escaping special characters. Please notice that escaping special characters will probably be needed at descriptions, at least for the asterisk character. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- Documentation/admin-guide/abi-stable.rst | 1 + Documentation/sphinx/kernel_abi.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/abi-stable.rst b/Documentation/admin-guide/abi-stable.rst index 7495d7a35048..70490736e0d3 100644 --- a/Documentation/admin-guide/abi-stable.rst +++ b/Documentation/admin-guide/abi-stable.rst @@ -11,3 +11,4 @@ Most interfaces (like syscalls) are expected to never change and always be available. .. kernel-abi:: $srctree/Documentation/ABI/stable + :rst: diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py index ce5f3b0ae811..f3da859c9878 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -73,12 +73,13 @@ class KernelCmd(Directive): u"""KernelABI (``kernel-abi``) directive""" required_arguments = 1 - optional_arguments = 0 + optional_arguments = 2 has_content = False final_argument_whitespace = True option_spec = { - "debug" : directives.flag + "debug" : directives.flag, + "rst" : directives.unchanged } def run(self): @@ -92,6 +93,9 @@ class KernelCmd(Directive): cmd = "get_abi.pl rest --enable-lineno --dir " cmd += self.arguments[0] + if 'rst' in self.options: + cmd += " --rst-source" + srctree = path.abspath(os.environ["srctree"]) fname = cmd -- 2.26.2