diff mbox series

[4/5] provisiondb: Document 'tags_match'.

Message ID 4815b6ef97f75f94685ea30c5d859f2e85422fbd.1738800116.git.gerickson@nuovations.com (mailing list archive)
State Under Review
Headers show
Series Correct Provisioning Database Tags Matching Behavior | expand

Commit Message

Grant Erickson Feb. 6, 2025, 12:34 a.m. UTC
Adds documentation to the 'tags_match' function.
---
 src/provisiondb.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff mbox series

Patch

diff --git a/src/provisiondb.c b/src/provisiondb.c
index 753d7725103a..c7d35e4ada8f 100644
--- a/src/provisiondb.c
+++ b/src/provisiondb.c
@@ -219,6 +219,26 @@  static int __get_string(struct provision_db const *pdb, uint64_t offset,
 	return 0;
 }
 
+/**
+ *  @brief
+ *    Return whether one of the tags in the specified tags array
+ *    matches one of the tags in the specified comma-separated tags
+ *    list.
+ *
+ *  @param[in]  tags_filter  An optional pointer to a string array of
+ *                           tags to match.
+ *  @param[in]  tags         An optional pointer to an immutable C
+ *                           string containing a comma-separated
+ *                           list of tags for @a tags_filter to
+ *                           match against.
+ *
+ *  @returns
+ *    True if @a tags_filter is non-null and one of its tags matches a
+ *    tag in @a tags; otherwise, false.
+ *
+ *  @private
+ *
+ */
 static bool tags_match(char **tags_filter, const char *tags)
 {
 	_auto_(l_strv_free) char **split_tags = 0;