Skip to content

Commit 642514d

Browse files
mchehabgregkh
authored andcommitted
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 <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/59ccbaa75ff05f23e701dd9a0bbe118e9343a553.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 906e4af commit 642514d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Documentation/admin-guide/abi-stable.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Most interfaces (like syscalls) are expected to never change and always
1111
be available.
1212

1313
.. kernel-abi:: $srctree/Documentation/ABI/stable
14+
:rst:

Documentation/sphinx/kernel_abi.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ class KernelCmd(Directive):
7373
u"""KernelABI (``kernel-abi``) directive"""
7474

7575
required_arguments = 1
76-
optional_arguments = 0
76+
optional_arguments = 2
7777
has_content = False
7878
final_argument_whitespace = True
7979

8080
option_spec = {
81-
"debug" : directives.flag
81+
"debug" : directives.flag,
82+
"rst" : directives.unchanged
8283
}
8384

8485
def run(self):
@@ -92,6 +93,9 @@ def run(self):
9293
cmd = "get_abi.pl rest --enable-lineno --dir "
9394
cmd += self.arguments[0]
9495

96+
if 'rst' in self.options:
97+
cmd += " --rst-source"
98+
9599
srctree = path.abspath(os.environ["srctree"])
96100

97101
fname = cmd

0 commit comments

Comments
 (0)