[Libguestfs] [PATCH 5/6] New API: btrfs_subvolume_get_default

Pino Toscano ptoscano at redhat.com
Mon Nov 24 14:59:13 UTC 2014


On Monday 24 November 2014 13:44:11 Hu Tao wrote:
> > > +  if (sscanf (out, "ID %" SCNi32, &r) != 1) {
> > 
> > It would be simplier to just use xstrtol to parse the output.
> 
> Then we should skip "ID " firstly.

Right (got focused on the integer parsing, and lost track of the "ID " 
prefix).

Then I guess sscanf could stay as you wrote it.

-- 
Pino Toscano




More information about the Libguestfs mailing list