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

Configure Feed

Select the types of activity you want to include in your feed.

rust: warn if `srctree/` links do not exist

`srctree/` links may point to nonexistent files, e.g. due to renames
that missed to update the files or simply because of typos.

Since they can be easily checked for validity, do so and print a warning
in the file does not exist.

This found the following cases already in-tree:

warning: srctree/ link to include/linux/blk_mq.h does not exist
warning: srctree/ link to include/linux/drm/drm_gem.h does not exist
warning: srctree/ link to include/linux/drm/drm_drv.h does not exist
warning: srctree/ link to include/linux/drm/drm_ioctl.h does not exist
warning: srctree/ link to include/linux/drm/drm_file.h does not exist
warning: srctree/ link to include/linux/drm/drm_device.h does not exist

Inspired-by: Onur Özkan <work@onurozkan.dev>
Link: https://lore.kernel.org/rust-for-linux/CANiq72=xCYA7z7_rxpzzKkkhJs6m7L_xEaLMuArVn3ZAcyeHdA@mail.gmail.com/
Reviewed-by: Onur Özkan <work@onurozkan.dev>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Tested-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+6
+6
rust/Makefile
··· 98 98 # and then retouch the generated files. 99 99 rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \ 100 100 rustdoc-kernel rustdoc-pin_init 101 + $(Q)grep -Ehro '<a href="srctree/([^"]+)"' $(rustdoc_output) | \ 102 + cut -d'"' -f2 | cut -d/ -f2- | while read f; do \ 103 + if [ ! -e "$(srctree)/$$f" ]; then \ 104 + echo "warning: srctree/ link to $$f does not exist"; \ 105 + fi \ 106 + done 101 107 $(Q)cp $(srctree)/Documentation/images/logo.svg $(rustdoc_output)/static.files/ 102 108 $(Q)cp $(srctree)/Documentation/images/COPYING-logo $(rustdoc_output)/static.files/ 103 109 $(Q)find $(rustdoc_output) -name '*.html' -type f -print0 | xargs -0 sed -Ei \