qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] About GlobalProperty
@ 2016-03-23  6:09 chagg
  0 siblings, 0 replies; only message in thread
From: chagg @ 2016-03-23  6:09 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

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! 


chagg@foxmail.com

[-- Attachment #2: Type: text/html, Size: 2488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-23  6:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-23  6:09 [Qemu-devel] About GlobalProperty chagg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).