qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] About GlobalProperty


From: address@hidden
Subject: [Qemu-devel] About GlobalProperty
Date: Wed, 23 Mar 2016 14:09:30 +0800

I read code in test-qdev-global-props.c. The test function test_static_globalprop_subprocess is:

static void test_static_globalprop_subprocess(void)
{
    MyType *mt;
    static GlobalProperty props[] = {
        { TYPE_STATIC_PROPS, "prop1", "200" },
        {}
    };

    qdev_prop_register_global_list(props);

    mt = STATIC_TYPE(object_new(TYPE_STATIC_PROPS));
    qdev_init_nofail(DEVICE(mt));

    g_assert_cmpuint(mt->prop1, ==, 200);
    g_assert_cmpuint(mt->prop2, ==, PROP_DEFAULT);
}

I found that the GlobalProperty props are registered, but I can not find where it be used. Can someone explain it? Thanks! 

address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]