[Libguestfs] [PATCH v3 1/2] New API: btrfs_balance_status

Richard W.M. Jones rjones at redhat.com
Wed Feb 11 14:00:14 UTC 2015


On Wed, Feb 11, 2015 at 06:41:19PM +0800, Chen Hanxiao wrote:
> +  if (nlines < 1)
> +    return NULL;

This error handling is wrong.  It would cause the protocol between the
appliance and library to become desynchronized.  You have to call one
of the error functions -- eg. `reply_with_error' before returning
NULL.

The rest of this patch looks fine, if this change was made.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list