From 491b6027baac56813560c093828441df33012530 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 8 Oct 2016 18:37:19 +0200 Subject: [PATCH] ifcfg-rh: add svUnsetValue() --- src/settings/plugins/ifcfg-rh/shvar.c | 6 ++++++ src/settings/plugins/ifcfg-rh/shvar.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c index 75b19d5383..df7849bfb5 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.c +++ b/src/settings/plugins/ifcfg-rh/shvar.c @@ -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 diff --git a/src/settings/plugins/ifcfg-rh/shvar.h b/src/settings/plugins/ifcfg-rh/shvar.h index 97df81284a..573e6413c0 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.h +++ b/src/settings/plugins/ifcfg-rh/shvar.h @@ -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.