ocaml/xapi/cli_frontend.ml | 5 +----
ocaml/xapi/xapi_cli.ml | 2 +-
ocaml/xe-cli/cli.ml | 8 +++++---
3 files changed, 7 insertions(+), 8 deletions(-)
# HG changeset patch
# User Mike McClurg <mike.mcclurg@xxxxxxxxxx>
# Date 1286985041 -3600
# Node ID 4a03e0233c3540ef703463bf422e766d3f352e08
# Parent 8ca7127d9f3909ed9459ed49e0cc6dbff3171afd
Deleted parse_commandline and renamed parse_commandline_2 to parse_commandline.
parse_commandline was only used for compat-mode, which we just removed.
Signed-off-by: Mike McClurg <mike.mcclurg@xxxxxxxxxx>
diff --git a/ocaml/xapi/cli_frontend.ml b/ocaml/xapi/cli_frontend.ml
--- a/ocaml/xapi/cli_frontend.ml
+++ b/ocaml/xapi/cli_frontend.ml
@@ -2423,9 +2423,6 @@
params = (parse_params ts) }
| _ -> raise (ParseError ("No arguments given"))
-let parse_commandline arg_array =
- parse (tokens_of_argv arg_array)
-
let rec parse_params_2 xs =
match xs with
p::ps ->
@@ -2448,7 +2445,7 @@
end
| [] -> []
-let parse_commandline_2 arg_list =
+let parse_commandline arg_list =
try
let argv0 = List.hd arg_list in
let cmdname = List.hd (List.tl arg_list) in
diff --git a/ocaml/xapi/xapi_cli.ml b/ocaml/xapi/xapi_cli.ml
--- a/ocaml/xapi/xapi_cli.ml
+++ b/ocaml/xapi/xapi_cli.ml
@@ -204,7 +204,7 @@
then (Some (Ref.of_string (String.sub line 11
(String.length line - 11))), List.tl args)
else (None,args)
with _ -> (None,args) in
- let cmd = parse_commandline_2 ("xe"::args) in
+ let cmd = parse_commandline ("xe"::args) in
ignore(exec_command req cmd s session args)
let exception_handler s e =
diff --git a/ocaml/xe-cli/cli.ml b/ocaml/xe-cli/cli.ml
--- a/ocaml/xe-cli/cli.ml
+++ b/ocaml/xe-cli/cli.ml
@@ -119,9 +119,11 @@
exit exit_error)
let main() =
-(* try*)
- let cmd = Cli_frontend.parse_commandline (Array.to_list Sys.argv) in
- exec_command cmd
+ (* try*)
+ let parse_commandline arg_array =
+ parse (tokens_of_argv arg_array) in
+ let cmd = parse_commandline (Array.to_list Sys.argv) in
+ exec_command cmd
(* with
Cli_frontend.ParseError s ->
param_error "Syntax error" s;
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|