mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 22:00:32 +01:00
ifcfg-rh: add svSetValueInt64() utility
This commit is contained in:
parent
bc5a8e2e18
commit
325faa2379
2 changed files with 10 additions and 0 deletions
|
|
@ -445,6 +445,15 @@ svSetValueFull (shvarFile *s, const char *key, const char *value, gboolean verba
|
|||
g_free (keyValue);
|
||||
}
|
||||
|
||||
void
|
||||
svSetValueInt64 (shvarFile *s, const char *key, gint64 value)
|
||||
{
|
||||
gs_free char *v = NULL;
|
||||
|
||||
v = g_strdup_printf ("%"G_GINT64_FORMAT, value);
|
||||
svSetValueFull (s, key, v, TRUE);
|
||||
}
|
||||
|
||||
/* Write the current contents iff modified. Returns FALSE on error
|
||||
* and TRUE on success. Do not write if no values have been modified.
|
||||
* The mode argument is only used if creating the file, not if
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ gint64 svGetValueInt64 (shvarFile *s, const char *key, guint base, gint64 min, g
|
|||
*/
|
||||
void svSetValue (shvarFile *s, const char *key, const char *value, gboolean verbatim);
|
||||
void svSetValueFull (shvarFile *s, const char *key, const char *value, gboolean verbatim);
|
||||
void svSetValueInt64 (shvarFile *s, const char *key, gint64 value);
|
||||
|
||||
|
||||
/* Write the current contents iff modified. Returns FALSE on error
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue