From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Sat, 2 Feb 2008 09:43:56 +0000 (+0000) Subject: Add default path and port to dialog. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=52433696d9755eb0e6cc5caa0f35b6690ace67fd;p=virt-p2v.git Add default path and port to dialog. --- diff --git a/virt-p2v.ml b/virt-p2v.ml index d735cee..3906518 100755 --- a/virt-p2v.ml +++ b/virt-p2v.ml @@ -610,7 +610,7 @@ let rec main ttyname = let ask_port state = match inputbox "Remote port" "Remote port" 10 50 - (Option.default "" state.remote_port) + (Option.default "22" state.remote_port) with | Yes ([]|""::_) -> Next { state with remote_port = Some "22" } | Yes (port::_) -> Next { state with remote_port = Some port } @@ -619,12 +619,12 @@ let rec main ttyname = in let ask_directory state = + let default_dir = "/var/lib/xen/images" in match inputbox "Remote directory" "Remote directory" 10 50 - (Option.default "" state.remote_directory) + (Option.default default_dir state.remote_directory) with - | Yes [] -> - Next { state with remote_directory = Some "/var/lib/xen/images" } + | Yes ([]|""::_) -> Next { state with remote_directory = Some default_dir } | Yes (dir::_) -> Next { state with remote_directory = Some dir } | No | Help | Error -> Ask_again | Back -> Prev