platform_bionic/libc/kernel/tools
Christopher Ferris 3fc4e11607 Add support for removing structs that cross blocks.
The latest kernel has a struct that needs to be removed,
but the struct crosses blocks. Add support for removing a
struct that does cross blocks. This support is very primitive,
and will not parse any really complicated struct that uses
defines in complicated ways.

Combine the kernel_structs_to_remove and kernel_struct_replacements
structure into a single map. This allows marking a structure
to be removed as replaced with an #include <bits/STRUCT.h>.

The new support for the remove of structures is all in the
removeStructs function.

Raise an exception if the struct parsing does not work properly.

Add new unit tests for all of the new code.

In addition, fix the algorithm for deleting the uapi directory
before it gets updated. A new file BUILD was checking in that
directory, so delete everything in the directory except that
BUILD file.

Test: Unit tests pass.
Test: Running update_all.py results in the no unexpected changes.
Change-Id: I9a8cef0321beaf71d03b5b874327747a7edb6119
2022-08-09 17:49:31 -07:00
..
clean_header.py Update for python3. 2021-04-19 17:02:38 -07:00
cpp.py Add support for removing structs that cross blocks. 2022-08-09 17:49:31 -07:00
defaults.py Add support for removing structs that cross blocks. 2022-08-09 17:49:31 -07:00
generate_uapi_headers.sh Clean up header files from kernel directory. 2020-12-03 18:18:52 -08:00
kernel.py Fix overly-zealous strip. 2021-04-20 16:05:02 -07:00
update_all.py Add support for removing structs that cross blocks. 2022-08-09 17:49:31 -07:00
utils.py Update for python3. 2021-04-19 17:02:38 -07:00