On Tue, Oct 20, 2015 at 04:30:48PM +0300, Maxim Perevedentsev wrote:
+ else if (STRPREFIX (lines[i], cluster_size_pattern)) {
+ if (sscanf (lines[i] + strlen (cluster_size_pattern),
+ "%*[ ]:%" SCNd32, &cluster_size) != 1) {
+ reply_with_error ("Cannot parse cluster size");
sscanf is fine. However please don't capitalize error messages.
It should be:
reply_with_error ("cannot parse cluster size");
(and a few other error messages too).
Rest of this patch looks OK to me.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html