qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors
Date: Thu, 30 Apr 2015 16:53:27 +0200	[thread overview]
Message-ID: <554241E7.8030407@redhat.com> (raw)
In-Reply-To: <1430404944-7322-5-git-send-email-berrange@redhat.com>



On 30/04/2015 16:42, Daniel P. Berrange wrote:
> + * object_new_propv:
> + * @typename:  The name of the type of the object to instantiate.
> + * @path: the object path to register under
> + * @id: The unique ID of the object
> + * @errp: pointer to error object
> + * @...: list of property names and values
> + *
> + * This function with initialize a new object using heap allocated memory.
> + * The returned object has a reference count of 1, and will be freed when
> + * the last reference is dropped.
> + *
> + * The @id parameter will be used to register the object in the /objects
> + * hierarchy.
> + *
> + * The variadic parameters are a list of pairs of (propname, propvalue)
> + * strings. The propname of NULL indicates the end of the property
> + * list. If the object implements the user creatable interface, the
> + * object will be marked complete once all the properties have been
> + * processed.
> + *
> + *   Error *err = NULL;
> + *   Object *obj;
> + *
> + *   obj = object_new_propv(TYPE_MEMORY_BACKEND_FILE,
> + *                          "/objects",

Only one thing I missed in my previous review---I'd rather make the path
an object, you can easily get it through container_get("/path").

I can fix this when committing the patches.

Paolo

  reply	other threads:[~2015-04-30 14:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 14:42 [Qemu-devel] [PATCH 0/7] qom: misc fixes & enhancements to support TLS work Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 1/7] qom: fix typename of 'policy' enum property in hostmem obj Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 2/7] qom: document user creatable object types in help text Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 3/7] qom: create objects in two phases Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors Daniel P. Berrange
2015-04-30 14:53   ` Paolo Bonzini [this message]
2015-04-30 14:54     ` Daniel P. Berrange
2015-04-30 15:00   ` Paolo Bonzini
2015-04-30 15:02     ` Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 5/7] qom: make enum string tables const-correct Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 6/7] qom: add a object_property_add_enum helper method Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 7/7] qom: don't pass string table to object_get_enum method Daniel P. Berrange

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=554241E7.8030407@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=berrange@redhat.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 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).