/**
* qemuBuildPRManagerInfoProps:
* @src: storage source
- * @propsret: Returns JSON object containing properties of the pr-manager-helper object
*
* Build the JSON properties for the pr-manager object.
- *
- * Returns: 0 on success (@propsret is NULL if no properties are needed),
- * -1 on failure (with error message set).
*/
-int
-qemuBuildPRManagerInfoProps(virStorageSourcePtr src,
- virJSONValuePtr *propsret)
+virJSONValuePtr
+qemuBuildPRManagerInfoProps(virStorageSourcePtr src)
{
- return qemuMonitorCreateObjectProps(propsret,
- "pr-manager-helper", src->pr->mgralias,
- "s:path", src->pr->path, NULL);
+ virJSONValuePtr ret = NULL;
+
+ if (qemuMonitorCreateObjectProps(&ret,
+ "pr-manager-helper", src->pr->mgralias,
+ "s:path", src->pr->path, NULL) < 0)
+ return NULL;
+
+ return ret;
}
managedAdded = true;
}
- if (qemuBuildPRManagerInfoProps(disk->src, &props) < 0)
+ if (!(props = qemuBuildPRManagerInfoProps(disk->src)))
goto cleanup;
if (virQEMUBuildObjectCommandlineFromJSON(&buf, props) < 0)
int **nicindexes);
/* Generate the object properties for pr-manager */
-int qemuBuildPRManagerInfoProps(virStorageSourcePtr src,
- virJSONValuePtr *propsret);
+virJSONValuePtr qemuBuildPRManagerInfoProps(virStorageSourcePtr src);
/* Generate the object properties for a secret */
int qemuBuildSecretInfoProps(qemuDomainSecretInfoPtr secinfo,