]> git.ipfire.org Git - thirdparty/systemd.git/commit
string-table: add new DUMP_STRING_TABLE() macro
authorLennart Poettering <lennart@poettering.net>
Tue, 22 May 2018 10:06:54 +0000 (12:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 May 2018 11:14:18 +0000 (13:14 +0200)
commitd34f3bc4e5862e22453c5d001b33ddd447b1f2a4
tree3c36ce9f51954b4fe0c0381f469513cdc62069b8
parent930362ab26afdd18fe22738cbfb1c374ae928c49
string-table: add new DUMP_STRING_TABLE() macro

The macro is inspired by the other string table macros, and takes the
same arguments in the same order and dumps a string table to stdout.
Since it's typesafe it's nice to implement this as macro rather than
regular function.

This new macro is useful for implementing commands such as "systemctl -t
help" and similar, i.e. wherever we want to dump all values of an enum
to stdout.
src/basic/string-table.h