ifcfg-rh: add svUnsetValue()

This commit is contained in:
Thomas Haller 2016-10-08 18:37:19 +02:00
parent b3b0cb0b17
commit 491b6027ba
2 changed files with 7 additions and 0 deletions

View file

@ -447,6 +447,12 @@ svSetValueInt64 (shvarFile *s, const char *key, gint64 value)
svSetValueFull (s, key, v, TRUE);
}
void
svUnsetValue (shvarFile *s, const char *key)
{
svSetValueFull (s, key, NULL, FALSE);
}
/* 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

View file

@ -73,6 +73,7 @@ void svSetValue (shvarFile *s, const char *key, const char *value, gboolean verb
void svSetValueFull (shvarFile *s, const char *key, const char *value, gboolean verbatim);
void svSetValueInt64 (shvarFile *s, const char *key, gint64 value);
void svUnsetValue (shvarFile *s, const char *key);
/* Write the current contents iff modified. Returns FALSE on error
* and TRUE on success. Do not write if no values have been modified.