Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script.sh: parse-defs: C: index defs that have a CONFIG_ in their line #344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 4, 2024

  1. script.sh: parse-defs: C: index defs that have a CONFIG_ in their line

    Take the pm_ptr() macro as example:
    
    ⟩ ctags -x --kinds-c=+p+x --extras='-{anonymous}' include/linux/pm.h | grep pm_ptr
    pm_ptr           macro       475 include/linux/pm.h #define pm_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM), (_ptr))
    
    The previous grep would remove the pm_ptr() line because it contains
    CONFIG_. We only want to remove a line if it starts with CONFIG_.
    
    Testing this commit:
    
    ⟩ export LXR_REPO_DIR=...
    ⟩ hash=97b0e23363c8283f53c361d8129ef90d7a2b9350
    ⟩ ./script.sh parse-defs $hash pm.h C | sort > /tmp/defs-pm-before.txt
    ⟩ # TODO: apply commit
    ⟩ ./script.sh parse-defs $hash pm.h C | sort > /tmp/defs-pm-after.txt
    ⟩ comm -13 /tmp/defs-pm-before.txt /tmp/defs-pm-after.txt
    pm_ptr macro 475
    pm_sleep_ptr macro 476
    
    Signed-off-by: Théo Lebrun <[email protected]>
    tleb committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    6313308 View commit details
    Browse the repository at this point in the history