@@ -184,27 +184,6 @@ qauthz_list_file_prop_get_filename(Object *obj,
}
-static void
-qauthz_list_file_prop_set_refresh(Object *obj,
- bool value,
- Error **errp G_GNUC_UNUSED)
-{
- QAuthZListFile *fauthz = QAUTHZ_LIST_FILE(obj);
-
- fauthz->refresh = value;
-}
-
-
-static bool
-qauthz_list_file_prop_get_refresh(Object *obj,
- Error **errp G_GNUC_UNUSED)
-{
- QAuthZListFile *fauthz = QAUTHZ_LIST_FILE(obj);
-
- return fauthz->refresh;
-}
-
-
static void
qauthz_list_file_finalize(Object *obj)
{
@@ -227,9 +206,9 @@ qauthz_list_file_class_init(ObjectClass *oc, void *data)
object_class_property_add_str(oc, "filename",
qauthz_list_file_prop_get_filename,
qauthz_list_file_prop_set_filename);
- object_class_property_add_bool(oc, "refresh",
- qauthz_list_file_prop_get_refresh,
- qauthz_list_file_prop_set_refresh);
+ object_class_property_add_bool_ptr(oc, "refresh",
+ offsetof(QAuthZListFile, refresh),
+ OBJ_PROP_FLAG_READWRITE);
authz->is_allowed = qauthz_list_file_is_allowed;
}
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: qemu-devel@nongnu.org --- authz/listfile.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-)