xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty
@ 2016-08-04  1:07 Bob Liu
  2016-08-04  8:07 ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Liu @ 2016-08-04  1:07 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, joao.m.martins, wei.liu2, Bob Liu

When specifying a serial list in domain config, users of
libxl_console_get_tty cannot get the tty path of a second specified pty serial,
since right now it always returns the tty path of serial 0.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
v2: Rename the patch title.
---
 tools/libxl/libxl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 2cf7451..00af286 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1795,7 +1795,7 @@ int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num,
 
     switch (type) {
     case LIBXL_CONSOLE_TYPE_SERIAL:
-        tty_path = GCSPRINTF("%s/serial/0/tty", dom_path);
+        tty_path = GCSPRINTF("%s/serial/%d/tty", dom_path, cons_num);
         break;
     case LIBXL_CONSOLE_TYPE_PV:
         if (cons_num == 0)
-- 
1.7.10.4


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty
  2016-08-04  1:07 [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty Bob Liu
@ 2016-08-04  8:07 ` Wei Liu
  2016-08-05  9:47   ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-08-04  8:07 UTC (permalink / raw)
  To: Bob Liu; +Cc: ian.jackson, joao.m.martins, xen-devel, wei.liu2

On Thu, Aug 04, 2016 at 09:07:56AM +0800, Bob Liu wrote:
> When specifying a serial list in domain config, users of
> libxl_console_get_tty cannot get the tty path of a second specified pty serial,
> since right now it always returns the tty path of serial 0.
> 
> Signed-off-by: Bob Liu <bob.liu@oracle.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

Ian, I think this is a backport candidate.

> ---
> v2: Rename the patch title.
> ---
>  tools/libxl/libxl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 2cf7451..00af286 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -1795,7 +1795,7 @@ int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num,
>  
>      switch (type) {
>      case LIBXL_CONSOLE_TYPE_SERIAL:
> -        tty_path = GCSPRINTF("%s/serial/0/tty", dom_path);
> +        tty_path = GCSPRINTF("%s/serial/%d/tty", dom_path, cons_num);
>          break;
>      case LIBXL_CONSOLE_TYPE_PV:
>          if (cons_num == 0)
> -- 
> 1.7.10.4
> 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty
  2016-08-04  8:07 ` Wei Liu
@ 2016-08-05  9:47   ` Wei Liu
  2016-08-05 16:16     ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-08-05  9:47 UTC (permalink / raw)
  To: Bob Liu; +Cc: ian.jackson, joao.m.martins, xen-devel, wei.liu2

On Thu, Aug 04, 2016 at 09:07:45AM +0100, Wei Liu wrote:
> On Thu, Aug 04, 2016 at 09:07:56AM +0800, Bob Liu wrote:
> > When specifying a serial list in domain config, users of
> > libxl_console_get_tty cannot get the tty path of a second specified pty serial,
> > since right now it always returns the tty path of serial 0.
> > 
> > Signed-off-by: Bob Liu <bob.liu@oracle.com>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> Ian, I think this is a backport candidate.
> 

Pushed.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty
  2016-08-05  9:47   ` Wei Liu
@ 2016-08-05 16:16     ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2016-08-05 16:16 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, joao.m.martins

Wei Liu writes ("Re: [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty"):
> On Thu, Aug 04, 2016 at 09:07:45AM +0100, Wei Liu wrote:
> > Ian, I think this is a backport candidate.

Queued, thanks.

Ian.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-05 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04  1:07 [PATCH v2] libxl: return any serial tty path in libxl_console_get_tty Bob Liu
2016-08-04  8:07 ` Wei Liu
2016-08-05  9:47   ` Wei Liu
2016-08-05 16:16     ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).