Skip to content

Commit

Permalink
libotutil: Add note on using ot_keyfile_get_string_as_list()
Browse files Browse the repository at this point in the history
Took a bit of time to remember why this exists, when looking
for a function to read a key from an ostree repo config.
  • Loading branch information
Robert Fairley committed Feb 14, 2019
1 parent aa02b9a commit ed63396
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libotutil/ot-keyfile-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ ot_keyfile_get_value_with_default (GKeyFile *keyfile,
* none of the separators, read the string as a single entry into a
* NULL-terminated array out_value. If the value string contains multiple of
* the separators, an error is given.
*
* Note: ot_keyfile_get_string_as_list() exists to implement the higher-level
* logic of checking for duplicates of separators present in the string, for
* strings where only one of a set of possible separators is accepted. To
* simply read a string from the keyfile with one accepted separator, use
* ot_keyfile_get_string_list_with_default().
*
* Returns TRUE on success, FALSE on error. */
gboolean
ot_keyfile_get_string_as_list (GKeyFile *keyfile,
Expand Down

0 comments on commit ed63396

Please sign in to comment.