Add default path and port to dialog.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 2 Feb 2008 09:43:56 +0000 (09:43 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 2 Feb 2008 09:43:56 +0000 (09:43 +0000)
virt-p2v.ml

index d735cee..3906518 100755 (executable)
@@ -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