[libvirt] [PATCH 1/6] conf: Introduce virStoragePoolDefFormatBuf
Ján Tomko
jtomko at redhat.com
Fri Apr 3 08:07:26 UTC 2015
On Thu, Apr 02, 2015 at 12:10:35PM +0200, Erik Skultety wrote:
> When modifying config/status XML, it might be handy to include some
> additional XML elements (e.g. <poolstatus>). In order to do so,
> introduce new formatting function virStoragePoolDefFormatBuf and make
> virStoragePoolDefFormat call it.
> ---
> src/conf/storage_conf.c | 78 +++++++++++++++++++++++++++++--------------------
> 1 file changed, 46 insertions(+), 32 deletions(-)
>
ACK with one nit:
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index b070448..a8e9876 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -1150,76 +1150,90 @@ virStoragePoolSourceFormat(virBufferPtr buf,
--- 8< ---
> - virBufferAdjustIndent(&buf, -2);
> - virBufferAddLit(&buf, "</pool>\n");
> + virBufferAdjustIndent(buf, -2);
> + virBufferAddLit(buf, "</pool>\n");
> +
> + return 0;
> +
> + error:
> + return -1;
The error label is not necessary - just return -1; directly (unless you
plan to add some cleanup code there in the near future).
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150403/65c3ae2f/attachment-0001.sig>
More information about the libvir-list
mailing list