[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_prop
From: |
Paolo Bonzini |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
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
- [Qemu-devel] [PATCH 0/7] qom: misc fixes & enhancements to support TLS work, Daniel P. Berrange, 2015/04/30
- [Qemu-devel] [PATCH 2/7] qom: document user creatable object types in help text, Daniel P. Berrange, 2015/04/30
- [Qemu-devel] [PATCH 1/7] qom: fix typename of 'policy' enum property in hostmem obj, Daniel P. Berrange, 2015/04/30
- [Qemu-devel] [PATCH 5/7] qom: make enum string tables const-correct, Daniel P. Berrange, 2015/04/30
- [Qemu-devel] [PATCH 7/7] qom: don't pass string table to object_get_enum method, Daniel P. Berrange, 2015/04/30
- [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors, Daniel P. Berrange, 2015/04/30
- [Qemu-devel] [PATCH 3/7] qom: create objects in two phases, Daniel P. Berrange, 2015/04/30
- [Qemu-devel] [PATCH 6/7] qom: add a object_property_add_enum helper method, Daniel P. Berrange, 2015/04/30