From c37e82c843bdf45035b0ea61245349b10fcc6787 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Thu, 22 Jan 2026 13:58:44 +0100 Subject: [PATCH] lvm: Fix getting VDO saving percent from LVM DBus API The SavingPercent property is a double so we can't directly save it to our (integer) struct. --- src/plugins/lvm/lvm-dbus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/lvm/lvm-dbus.c b/src/plugins/lvm/lvm-dbus.c index 877a72a5..89b6daff 100644 --- a/src/plugins/lvm/lvm-dbus.c +++ b/src/plugins/lvm/lvm-dbus.c @@ -1405,6 +1405,7 @@ static BDLVMVDOPooldata* get_vdo_data_from_props (GVariant *props, GError **erro BDLVMVDOPooldata *data = g_new0 (BDLVMVDOPooldata, 1); GVariantDict dict; gchar *value = NULL; + gdouble percent = 0; g_variant_dict_init (&dict, props); @@ -1469,7 +1470,8 @@ static BDLVMVDOPooldata* get_vdo_data_from_props (GVariant *props, GError **erro value = NULL; g_variant_dict_lookup (&dict, "UsedSize", "t", &(data->used_size)); - g_variant_dict_lookup (&dict, "SavingPercent", "d", &(data->saving_percent)); + g_variant_dict_lookup (&dict, "SavingPercent", "d", &percent); + data->saving_percent = (int) percent; g_variant_dict_lookup (&dict, "IndexMemorySize", "t", &(data->index_memory_size));