Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: kernel_include.py: drop some old behavior

The old behavior is not using anymore, so let's drop it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/00cdf3cbe2481aac875c543ded14b5eacfe071ec.1756732363.git.mchehab+huawei@kernel.org

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
118e5463 8dbb1779

+3 -14
+3 -14
Documentation/sphinx/kernel_include.py
··· 316 316 env = self.state.document.settings.env 317 317 318 318 # 319 - # The include logic accepts only patches relative to: 320 - # - Kernel source tree 321 - # - Documentation output directory 322 - # 323 - # The logic does check it to prevent directory traverse 319 + # The include logic accepts only patches relative to the 320 + # Kernel source tree. The logic does check it to prevent 321 + # directory traverse issues. 324 322 # 325 323 326 324 srctree = os.path.abspath(os.environ["srctree"]) ··· 329 331 if os.path.isfile(src_path): 330 332 base = srctree 331 333 path = src_path 332 - elif os.path.exists(arg): 333 - # Allow patches from output dir 334 - base = os.getcwd() 335 - path = os.path.abspath(path) 336 334 else: 337 335 raise self.warning(f'File "%s" doesn\'t exist', path) 338 336 ··· 352 358 # 353 359 354 360 env.note_dependency(os.path.abspath(path)) 355 - 356 - # HINT: I had to copy&paste the whole Include.run method. I'am not happy 357 - # with this, but due to security reasons, the Include.run method does 358 - # not allow absolute or relative pathnames pointing to locations *above* 359 - # the filesystem tree where the reST document is placed. 360 361 361 362 if not self.state.document.settings.file_insertion_enabled: 362 363 raise self.warning('"%s" directive disabled.' % self.name)