On Mon, Jul 23, 2012 at 05:09:49PM +0800, Wanlong Gao wrote:
On 07/23/2012 05:02 PM, Richard W.M. Jones wrote:
On Mon, Jul 23, 2012 at 04:40:35PM +0800, Wanlong Gao wrote:
On 07/23/2012 04:16 PM, Richard W.M. Jones wrote:
On Mon, Jul 23, 2012 at 11:43:23AM +0800, Wanlong Gao wrote:
Use Dev_or_Path type for device or path arguments.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- generator/generator_actions.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index da01d7e..ca9e078 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -2749,7 +2749,7 @@ characters does I<not> work, even if the length is specified." };
{ defaults with name = "umount"; - style = RErr, [String "pathordevice"], [OBool "force"; OBool "laze"]; + style = RErr, [Dev_or_Path "pathordevice"], [OBool "force"; OBool "laze"];
Does this actually work? The do_umount function still calls RESOLVE_DEVICE, so this would now be done twice.
Yes, it works, double resolve device is harmless.
It's still wrong though.
Changing this very critical and low-level code doesn't seem to be necessary in order to add new APIs (xfs*) or change umount (patch 3/4).
OK, got it, so what do you prefer? Drop the new STRDUP_xxx macro and keep the original style?
So I don't want to discourage you or anyone, but this particular code is very critical to libguestfs working, so unless a change is really necessary and the reasoning is very well explained I'm reluctant to accept it. Adding the new parameters (force, lazyunmount) to umount is fine. 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