[Libguestfs] [PATCH V3 2/2] xfs_info: resolve device when doing xfs_info on a device

Richard W.M. Jones rjones at redhat.com
Tue Jul 24 08:45:34 UTC 2012


On Tue, Jul 24, 2012 at 04:33:46PM +0800, Wanlong Gao wrote:
> On 07/24/2012 04:32 PM, Richard W.M. Jones wrote:
> > On Mon, Jul 23, 2012 at 05:51:32PM +0800, Wanlong Gao wrote:
> >> -    style = RStruct ("info", "xfsinfo"), [Pathname "path"], [];
> >> +    style = RStruct ("info", "xfsinfo"), [String "pathordevice"], [];
> > 
> > Actually NACK to this.  I don't understand why you don't
> > use Dev_or_Path here.
> 
> Dev_or_Path generates RESOLVE_DEVICE code in stubs.c, then
> it does RESOLVE_DEVICE twice, right?

Not if you don't add RESOLVE_DEVICE to the code ...

The point about the generator is that it adds all the right things for
you, so you don't need to call these functions in the 'do_*' function.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v




More information about the Libguestfs mailing list