Permalink
Browse files

Console clean up

  • Loading branch information...
1 parent dc10aae commit ab86e796b1fdb4f544ef09a8604225baaa7ccc04 @msantos committed Sep 20, 2012
Showing with 4 additions and 7 deletions.
  1. +4 −7 bin/verx
View
11 bin/verx
@@ -32,7 +32,10 @@ call(["capabilities" | Arg]) ->
rp(verx:get_capabilities(Ref));
call(["console", Name | Arg]) ->
- console(Name, Arg);
+ Opt = getopt(Arg),
+ Pid = spawn_link(fun() -> console_recv(Name, Opt) end),
+ ok = io:setopts(standard_io, [binary]),
+ tty_read(Pid);
call(["ctl-alt-del", Name | Arg]) ->
call(["send-key", Name, "29 56 111" | Arg]);
@@ -487,12 +490,6 @@ progress(69, Total) when Total ->
progress(_, _) ->
io:format(".").
-console(Name, Arg) ->
- Opt = getopt(Arg),
- Pid = spawn_link(fun() -> console_recv(Name, Opt) end),
- ok = io:setopts(standard_io, [binary]),
- tty_read(Pid).
-
tty_read(Pid) ->
Buf = io:get_line(""),
Pid ! {tty_read, Buf},

0 comments on commit ab86e79

Please sign in to comment.