]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: rework generation of file system lookup helpers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 25 Jul 2025 14:29:10 +0000 (16:29 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 27 Jul 2025 11:13:54 +0000 (13:13 +0200)
commitb0123576f4d2603e721e77932e8ed9b9e37b4a2e
treec6b7d6bd6d4e75ea8d61058f2908d3d88c6c2102
parentc136be3f04bf2c96e99a7466deb4eb491fb117b2
meson: rework generation of file system lookup helpers

Previously, the gperf table was the main "source of truth", and additional
information (e.g. which file system names are obsolete) was scattered in
various files. We would then parse the gperf file, using python, awk, grep, and
bash, and use the results in various ways. This is hard to understand and
maintain. Let's replace all of this with a single python script that generates
the requested outputs as appropriate.

$ diff -u <(git show @{u}:src/basic/filesystems-gperf.gperf) \
          <(src/basic/filesystem-sets.py gperf)
shows that the outputs are the same except for comments.

Similarly, 'src/basic/filesystem-sets.py fs-type-to-string' and
'src/basic/filesystem-sets.py filesystem-sets' can be used to view
the generated code.

The check that the kernel doesn't define any new file system magics is
converted into a normal test. It doesn't seem necessary to fail the build
when that happens.
src/basic/check-filesystems.sh [deleted file]
src/basic/filesystem-sets.py [new file with mode: 0755]
src/basic/filesystems-gperf.gperf [deleted file]
src/basic/filesystems.c
src/basic/generate-filesystem-list.py [deleted file]
src/basic/generate-filesystem-switch-case.py [deleted file]
src/basic/meson.build