mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 10:08:05 +02:00
ifcfg: add svSetValueBoolean_cond_true() helper
(cherry picked from commit 87af96a9d6)
This commit is contained in:
parent
8e2ad6f0c3
commit
f449ace2f1
2 changed files with 7 additions and 0 deletions
|
|
@ -1356,6 +1356,12 @@ svSetValueBoolean (shvarFile *s, const char *key, gboolean value)
|
||||||
return svSetValue (s, key, value ? "yes" : "no");
|
return svSetValue (s, key, value ? "yes" : "no");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
svSetValueBoolean_cond_true (shvarFile *s, const char *key, gboolean value)
|
||||||
|
{
|
||||||
|
return svSetValue (s, key, value ? "yes" : NULL);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
svSetValueEnum (shvarFile *s, const char *key, GType gtype, int value)
|
svSetValueEnum (shvarFile *s, const char *key, GType gtype, int value)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ gboolean svGetValueEnum (shvarFile *s, const char *key,
|
||||||
gboolean svSetValue (shvarFile *s, const char *key, const char *value);
|
gboolean svSetValue (shvarFile *s, const char *key, const char *value);
|
||||||
gboolean svSetValueStr (shvarFile *s, const char *key, const char *value);
|
gboolean svSetValueStr (shvarFile *s, const char *key, const char *value);
|
||||||
gboolean svSetValueBoolean (shvarFile *s, const char *key, gboolean value);
|
gboolean svSetValueBoolean (shvarFile *s, const char *key, gboolean value);
|
||||||
|
gboolean svSetValueBoolean_cond_true (shvarFile *s, const char *key, gboolean value);
|
||||||
gboolean svSetValueInt64 (shvarFile *s, const char *key, gint64 value);
|
gboolean svSetValueInt64 (shvarFile *s, const char *key, gint64 value);
|
||||||
gboolean svSetValueInt64_cond (shvarFile *s, const char *key, gboolean do_set, gint64 value);
|
gboolean svSetValueInt64_cond (shvarFile *s, const char *key, gboolean do_set, gint64 value);
|
||||||
gboolean svSetValueEnum (shvarFile *s, const char *key, GType gtype, int value);
|
gboolean svSetValueEnum (shvarFile *s, const char *key, GType gtype, int value);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue