All of lore.kernel.org
 help / color / mirror / Atom feed
From: "chagg@foxmail.com" <chagg@foxmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] About GlobalProperty
Date: Wed, 23 Mar 2016 14:09:30 +0800	[thread overview]
Message-ID: <201603231409298532715@foxmail.com> (raw)

[-- 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 --]

                 reply	other threads:[~2016-03-23  6:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201603231409298532715@foxmail.com \
    --to=chagg@foxmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.