Permalink
Browse files

vert: fix pasto in option handling

  • Loading branch information...
1 parent cd101af commit 122bdae1f728e93f6b15d90ac01df0eecb4e3315 @msantos committed Aug 24, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 bin/vert
View
@@ -87,12 +87,11 @@ main(["recv", Host, Timeout0]) ->
main(["screenshot", Host | Arg]) ->
Opt = getopt(Arg),
+ error_logger:info_report([{opt, Opt}]),
Screen = proplists:get_value("screen", Opt, 0),
File = proplists:get_value("file", Opt,
Host ++ "_" ++ os:getpid() ++ ".screen"),
- error_logger:info_report([{opt, Opt}]),
-
{ok, Connect} = connect(Opt),
{ok, Domain} = domain(Connect, Host),
% XXX Put the stream in blocking mode. Seems to be the only way to
@@ -181,7 +180,7 @@ getopt([], Acc) ->
getopt(["--" ++ Key, "--" ++ _ = Val | Rest], Acc) ->
getopt([Val|Rest], [{Key, true}|Acc]);
getopt(["--" ++ Key, Val | Rest], Acc) ->
- getopt([Val|Rest], [{Key, true}|Acc]).
+ getopt(Rest, [{Key, Val}|Acc]).
connect(Opt) ->
URI = proplists:get_value("uri", Opt, "qemu:///system"),

0 comments on commit 122bdae

Please sign in to comment.