]> git.ipfire.org Git - thirdparty/util-linux.git/commit
findmnt: improve reliability of match testing
authorKarel Zak <kzak@redhat.com>
Mon, 11 Nov 2024 13:52:53 +0000 (14:52 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Jan 2025 12:57:43 +0000 (13:57 +0100)
commit90b9ab56818d3bbcf7e23261003a66677b7cd391
treeb98c47c9c488527939499c4651fad3b83d274957
parentb4cab6cc071034b7eff7dbc322300a83e2b49665
findmnt: improve reliability of match testing

The "match" is defined if a string or void data is defined for the
matching function. It is necessary to test both variants instead of
relying solely on get_match(), which only returns string data.

This patch introduces the is_defined_match() macro to hide this detail
in the code and make it more readable.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.c