libotutil: Rename to ot_keyfile_get_string_list_with_separator_choice()
Rename ot_keyfile_get_string_as_list() to ot_keyfile_get_string_list_with_separator_choice() which expresses more clearly why the function is needed. Also shorten the function comment. Closes: #1814 Approved by: jlebon
This commit is contained in:
parent
52987b532c
commit
91892e3c3f
|
|
@ -5186,8 +5186,12 @@ _ostree_repo_gpg_verify_data_internal (OstreeRepo *self,
|
||||||
|
|
||||||
g_auto(GStrv) gpgkeypath_list = NULL;
|
g_auto(GStrv) gpgkeypath_list = NULL;
|
||||||
|
|
||||||
if (!ot_keyfile_get_string_as_list (remote->options, remote->group, "gpgkeypath",
|
if (!ot_keyfile_get_string_list_with_separator_choice (remote->options,
|
||||||
";,", &gpgkeypath_list, error))
|
remote->group,
|
||||||
|
"gpgkeypath",
|
||||||
|
";,",
|
||||||
|
&gpgkeypath_list,
|
||||||
|
error))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (gpgkeypath_list)
|
if (gpgkeypath_list)
|
||||||
|
|
|
||||||
|
|
@ -101,20 +101,19 @@ ot_keyfile_get_value_with_default (GKeyFile *keyfile,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the value of key as a string. If the value string contains
|
/* Read the value of key as a string. If the value string contains
|
||||||
* one of the separators and none of the others, read the
|
* zero or one of the separators and none of the others, read the
|
||||||
* string as a NULL-terminated array out_value. If the value string contains
|
* string as a NULL-terminated array out_value. If the value string
|
||||||
* none of the separators, read the string as a single entry into a
|
* contains multiple of the separators, give an error.
|
||||||
* NULL-terminated array out_value. If the value string contains multiple of
|
*
|
||||||
* the separators, an error is given.
|
|
||||||
* Returns TRUE on success, FALSE on error. */
|
* Returns TRUE on success, FALSE on error. */
|
||||||
gboolean
|
gboolean
|
||||||
ot_keyfile_get_string_as_list (GKeyFile *keyfile,
|
ot_keyfile_get_string_list_with_separator_choice (GKeyFile *keyfile,
|
||||||
const char *section,
|
const char *section,
|
||||||
const char *key,
|
const char *key,
|
||||||
const char *separators,
|
const char *separators,
|
||||||
char ***out_value,
|
char ***out_value,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
guint sep_count = 0;
|
guint sep_count = 0;
|
||||||
gchar sep = '\0';
|
gchar sep = '\0';
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,12 @@ ot_keyfile_get_value_with_default (GKeyFile *keyfile,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ot_keyfile_get_string_as_list (GKeyFile *keyfile,
|
ot_keyfile_get_string_list_with_separator_choice (GKeyFile *keyfile,
|
||||||
const char *section,
|
const char *section,
|
||||||
const char *key,
|
const char *key,
|
||||||
const char *separators,
|
const char *separators,
|
||||||
char ***out_value_list,
|
char ***out_value_list,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ot_keyfile_get_string_list_with_default (GKeyFile *keyfile,
|
ot_keyfile_get_string_list_with_default (GKeyFile *keyfile,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue