From a7ee04b3ef0d2b2514730928a04a112f04ffe7df Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 30 Oct 2020 08:40:36 +0100 Subject: docs: add ABI documentation to the admin-guide book As we don't want a generic Sphinx extension to execute commands, change the one proposed to Markus to call the abi_book.pl script. Use a script to parse the Documentation/ABI directory and output it at the admin-guide. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5651482b06500e69a1acdf92152f90a203e6521d.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman --- Documentation/admin-guide/abi-stable.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Documentation/admin-guide/abi-stable.rst (limited to 'Documentation/admin-guide/abi-stable.rst') diff --git a/Documentation/admin-guide/abi-stable.rst b/Documentation/admin-guide/abi-stable.rst new file mode 100644 index 000000000000..7495d7a35048 --- /dev/null +++ b/Documentation/admin-guide/abi-stable.rst @@ -0,0 +1,13 @@ +ABI stable symbols +================== + +Documents the interfaces that the developer has defined to be stable. + +Userspace programs are free to use these interfaces with no +restrictions, and backward compatibility for them will be guaranteed +for at least 2 years. + +Most interfaces (like syscalls) are expected to never change and always +be available. + +.. kernel-abi:: $srctree/Documentation/ABI/stable -- cgit v1.2.3 From 642514df1bc1c6a9318b537670fdb55a6ee38e45 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 30 Oct 2020 08:40:41 +0100 Subject: docs: ABI: make it parse ABI/stable as ReST-compatible files 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. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/59ccbaa75ff05f23e701dd9a0bbe118e9343a553.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman --- Documentation/admin-guide/abi-stable.rst | 1 + Documentation/sphinx/kernel_abi.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'Documentation/admin-guide/abi-stable.rst') 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 -- cgit v1.2.3