[PATCH] virconf: Also debug print 'setting' when getting a value
From: Michal Privoznik <mprivozn@redhat.com> Our virConfGetValue*() functions debug print expected type for a config value and actual type found. This results in following debug messages: debug : virConfGetValueString:873 : Get value string (nil) 0 debug : virConfGetValueString:873 : Get value string (nil) 0 Well, it's unclear which settings are queried. Let's put them into the debug messages, producing following output: debug : virConfGetValueString:873 : Get value string remote_mode (nil) 0 debug : virConfGetValueString:873 : Get value string remote_proxy (nil) 0 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/util/virconf.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index c4238e68d9..4208ab80c4 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -870,8 +870,8 @@ int virConfGetValueString(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value string %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value string %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -918,8 +918,8 @@ int virConfGetValueStringList(virConf *conf, size_t len; virConfValue *eval; - VIR_DEBUG("Get value string list %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value string list %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -993,8 +993,8 @@ int virConfGetValueBool(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value bool %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value bool %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -1041,8 +1041,8 @@ int virConfGetValueInt(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value int %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value int %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -1090,8 +1090,8 @@ int virConfGetValueUInt(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value uint %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value uint %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -1185,8 +1185,8 @@ int virConfGetValueSizeT(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value size_t %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value size_t %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -1235,8 +1235,8 @@ int virConfGetValueSSizeT(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value ssize_t %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value ssize_t %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -1292,8 +1292,8 @@ int virConfGetValueLLong(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value long long %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value long long %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; @@ -1339,8 +1339,8 @@ int virConfGetValueULLong(virConf *conf, { virConfValue *cval = virConfGetValue(conf, setting); - VIR_DEBUG("Get value unsigned long long %p %d", - cval, cval ? cval->type : VIR_CONF_NONE); + VIR_DEBUG("Get value unsigned long long %s %p %d", + setting, cval, cval ? cval->type : VIR_CONF_NONE); if (!cval) return 0; -- 2.56.1
On Fri, Nov 27, 2026 at 17:02:20 +0100, Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
Our virConfGetValue*() functions debug print expected type for a config value and actual type found. This results in following debug messages:
debug : virConfGetValueString:873 : Get value string (nil) 0 debug : virConfGetValueString:873 : Get value string (nil) 0
Well, it's unclear which settings are queried. Let's put them into the debug messages, producing following output:
debug : virConfGetValueString:873 : Get value string remote_mode (nil) 0 debug : virConfGetValueString:873 : Get value string remote_proxy (nil) 0
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/util/virconf.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
Reviewed-by: Peter Krempa <pipo@pipo.sk>
participants (2)
-
Michal Privoznik -
Peter Krempa