qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "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 15:54:36 +0100	[thread overview]
Message-ID: <20150430145436.GA7110@redhat.com> (raw)
In-Reply-To: <554241E7.8030407@redhat.com>

On Thu, Apr 30, 2015 at 04:53:27PM +0200, Paolo Bonzini wrote:
> 
> 
> 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.

Oh, i misunderstood - I thought you only wanted the path. I'm fine with
the API either way.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2015-04-30 14:54 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
2015-04-30 14:54     ` Daniel P. Berrange [this message]
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=20150430145436.GA7110@redhat.com \
    --to=berrange@redhat.com \
    --cc=afaerber@suse.de \
    --cc=pbonzini@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).