]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-path: drop "-dir" and "-path" suffixes from path enums
authorLennart Poettering <lennart@poettering.net>
Thu, 28 May 2020 07:28:28 +0000 (09:28 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 May 2020 21:54:35 +0000 (23:54 +0200)
commitccdf03b9c72bada6a9da49ce3597ed5eac88cab8
treee2e0ae329a808eb5c672e99e9d8ccdbfb319aae4
parent4a56315a990b802860170ecd1bbd3eb68e14a38b
sd-path: drop "-dir" and "-path" suffixes from path enums

Clean up the naming of the sd-path enums. Previously, the more recently
added fields where named in the form SD_PATH_xyz_DIR and
SD_PATH_xyz_PATH, while the older fields where called just SD_PATH_xyz
and SD_PATH_SEARCH_xyz. Let's clean this up, to come to a more unified
way how we name this stuff.

I opted to stick to the old naming, i.e. dropthe suffixes. It's a bit of
a bike-shedding question of course, but I think there's a good reason to
avoid the additional DIR and PATH suffixes: the enum prefix contains
"PATH" anyway (i.e. "SD_PATH_"), so including PATH twice in each name is
redundant. Moreover, the key difference between the enums with the "dir"
and the "path" in the name is that the latter are *seach* paths, and I
think this is better emphasized by sticking to the "SEARCH" in the name.

Moreover dropping the suffixes makes the identifiers a lot shorter, in
particular in the "systemd-path" list output. And that's always good.

This means the naming pkgconfig file and in sd-path slightly deviate
(though the mapping is very simple), but I think that's OK, given that
this is developer facing and not user facing.
man/sd_path_lookup.xml
src/libsystemd/sd-path/sd-path.c
src/path/path.c
src/systemd/sd-path.h