Re: [Xen-devel] [PATCH 09/10] xen/arm: vpl011: Add new virtual console to xenconsole client

2017-04-19 Thread Stefano Stabellini
On Mon, 3 Apr 2017, Bhupinder Thakur wrote:
> Add a new console type VCON to connect to the virtual console.

VUART is a better name here too. Please add a doc under docs/misc to
document the new xenstore paths.


> Signed-off-by: Bhupinder Thakur 
> ---
>  tools/console/client/main.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/console/client/main.c b/tools/console/client/main.c
> index 99f..03b6fb1 100644
> --- a/tools/console/client/main.c
> +++ b/tools/console/client/main.c
> @@ -264,6 +264,7 @@ typedef enum {
> CONSOLE_INVAL,
> CONSOLE_PV,
> CONSOLE_SERIAL,
> +   CONSOLE_VCON,
>  } console_type;
>  
>  static struct termios stdin_old_attr;
> @@ -361,6 +362,8 @@ int main(int argc, char **argv)
>   type = CONSOLE_SERIAL;
>   else if (!strcmp(optarg, "pv"))
>   type = CONSOLE_PV;
> + else if (!strcmp(optarg, "vcon"))
> + type = CONSOLE_VCON;
>   else {
>   fprintf(stderr, "Invalid type argument\n");
>   fprintf(stderr, "Console types supported are: 
> serial, pv\n");
> @@ -436,6 +439,9 @@ int main(int argc, char **argv)
>   else
>   snprintf(path, strlen(dom_path) + 
> strlen("/device/console/%d/tty") + 5, "%s/device/console/%d/tty", dom_path, 
> num);
>   }
> + if (type == CONSOLE_VCON) {
> + snprintf(path, strlen(dom_path) + strlen("/console/vtty") + 1, 
> "%s/console/vtty", dom_path);
> + }
>  
>   /* FIXME consoled currently does not assume domain-0 doesn't have a
>  console which is good when we break domain-0 up.  To keep us
> -- 
> 2.7.4
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 09/10] xen/arm: vpl011: Add new virtual console to xenconsole client

2017-04-03 Thread Bhupinder Thakur
Add a new console type VCON to connect to the virtual console.

Signed-off-by: Bhupinder Thakur 
---
 tools/console/client/main.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 99f..03b6fb1 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -264,6 +264,7 @@ typedef enum {
CONSOLE_INVAL,
CONSOLE_PV,
CONSOLE_SERIAL,
+   CONSOLE_VCON,
 } console_type;
 
 static struct termios stdin_old_attr;
@@ -361,6 +362,8 @@ int main(int argc, char **argv)
type = CONSOLE_SERIAL;
else if (!strcmp(optarg, "pv"))
type = CONSOLE_PV;
+   else if (!strcmp(optarg, "vcon"))
+   type = CONSOLE_VCON;
else {
fprintf(stderr, "Invalid type argument\n");
fprintf(stderr, "Console types supported are: 
serial, pv\n");
@@ -436,6 +439,9 @@ int main(int argc, char **argv)
else
snprintf(path, strlen(dom_path) + 
strlen("/device/console/%d/tty") + 5, "%s/device/console/%d/tty", dom_path, 
num);
}
+   if (type == CONSOLE_VCON) {
+   snprintf(path, strlen(dom_path) + strlen("/console/vtty") + 1, 
"%s/console/vtty", dom_path);
+   }
 
/* FIXME consoled currently does not assume domain-0 doesn't have a
   console which is good when we break domain-0 up.  To keep us
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel