[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen master] xl: Accept a list for serial in config file
From: patchbot () xen ! org
Date: 2014-08-30 13:00:35
Message-ID: E1XNiGh-000770-Mq () xenbits ! xen ! org
[Download RAW message or body]
commit ceba2249707724594b268482da34a0725adbe6da
Author: White, Edmund H <edmund.h.white@intel.com>
AuthorDate: Wed Aug 13 19:14:07 2014 +0000
Commit: Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Aug 26 21:15:15 2014 +0100
xl: Accept a list for serial in config file
Allow the "serial" key to accept a list of serial ports, and pass
them in using the new serial_list domain build element.
For backwards compatibility, still accept singleton values.
Also update the xl.cfg manpage.
This patch borrows substantially from the multiple USB device patch
c3a2148192705592d38407ba9919eb1eb151a153.
Signed-off-by: Ed White <edmund.h.white@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
docs/man/xl.cfg.pod.5 | 6 ++++--
tools/libxl/xl_cmdimpl.c | 21 +++++++++++++++++++--
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index 1e04eed..21ca502 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -1281,13 +1281,15 @@ an usb2 controller. The default is disabled (0).
=over 4
-=item B<serial=DEVICE>
+=item B<serial=[ "DEVICE", "DEVICE", ...]>
-Redirect the virtual serial port to B<DEVICE>. Please see the
+Redirect virtual serial ports to B<DEVICE>s. Please see the
B<-serial> option in the L<qemu(1)> manpage for details of the valid
B<DEVICE> options. Default is B<vc> when in graphical mode and
B<stdio> if B<nographics=1> is used.
+The form serial=DEVICE is also accepted for backwards compatibilty.
+
=item B<soundhw=DEVICE>
Select the virtual sound card to expose to the guest. The valid
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index f1c136a..bdca14b 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1683,9 +1683,26 @@ skip_vfb:
if (!xlu_cfg_get_long (config, "spiceusbredirection", &l, 0))
b_info->u.hvm.spice.usbredirection = l;
xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, 0);
- xlu_cfg_get_defbool(config, "gfx_passthru",
+ xlu_cfg_get_defbool(config, "gfx_passthru",
&b_info->u.hvm.gfx_passthru, 0);
- xlu_cfg_replace_string (config, "serial", &b_info->u.hvm.serial, 0);
+ switch (xlu_cfg_get_list_as_string_list(config, "serial",
+ &b_info->u.hvm.serial_list,
+ 1))
+ {
+
+ case 0: break; /* Success */
+ case ESRCH: break; /* Option not present */
+ case EINVAL:
+ /* If it's not a valid list, try reading it as an atom,
+ * falling through to an error if it fails */
+ if (!xlu_cfg_replace_string(config, "serial",
+ &b_info->u.hvm.serial, 0))
+ break;
+ /* FALLTHRU */
+ default:
+ fprintf(stderr,"xl: Unable to parse serial.\n");
+ exit(-ERROR_FAIL);
+ }
xlu_cfg_replace_string (config, "boot", &b_info->u.hvm.boot, 0);
xlu_cfg_get_defbool(config, "usb", &b_info->u.hvm.usb, 0);
if (!xlu_cfg_get_long (config, "usbversion", &l, 0))
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic