Use Dev_or_Path.
Remove the RESOLVE_DEVICE since Dev_or_Path will generate
the resolve code.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
daemon/mount.c | 3 ---
generator/generator_actions.ml | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/daemon/mount.c b/daemon/mount.c
index 1ad99fa..86a707a 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -208,9 +208,6 @@ do_umount (const char *pathordevice,
return -1;
}
- if (is_dev)
- RESOLVE_DEVICE (buf, , { free (buf); return -1; });
-
if (!(optargs_bitmask & GUESTFS_UMOUNT_FORCE_BITMASK))
force = 0;
if (!(optargs_bitmask & GUESTFS_UMOUNT_LAZYUNMOUNT_BITMASK))
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index 4e18b4e..8ac6a14 100644
--- a/generator/generator_actions.ml
+++ b/generator/generator_actions.ml
@@ -2772,7 +2772,7 @@ characters does I<not> work, even if the length is
specified." };
{ defaults with
name = "umount";
- style = RErr, [String "pathordevice"], [OBool "force"; OBool
"lazyunmount"];
+ style = RErr, [Dev_or_Path "pathordevice"], [OBool "force"; OBool
"lazyunmount"];
proc_nr = Some 45;
fish_alias = ["unmount"];
once_had_no_optargs = true;
--
1.7.12.rc0