Permalink
Browse files

Allow passing an URI for the console

  • Loading branch information...
msantos committed Aug 28, 2012
1 parent 3edb723 commit ea29cdf7881f214e9ebb502de4e0a067988911d3
Showing with 5 additions and 2 deletions.
  1. +5 −2 bin/vert
View
@@ -31,13 +31,16 @@ call(["capabilities" | Arg]) ->
{ok, Connect} = connect(Opt),
rp(vert:virConnectGetCapabilities(Connect));
-call(["console", Name]) ->
+call(["console", Name | Arg]) ->
+ Opt = getopt(Arg),
+ URI = proplists:get_value("uri", Opt, "qemu:///session"),
+
io:setopts(standard_io, [binary]),
{ok, FD} = serctl:open({fd, 0}),
ok = serctl:tcsetattr(FD, tcsanow, serctl:mode(raw)),
- {ok, Ref} = vert_console:open(Name),
+ {ok, Ref} = vert_console:open(Name, [{uri, URI}]),
spawn_link(fun() -> console_output(Ref) end),
console_input(Ref);

0 comments on commit ea29cdf

Please sign in to comment.