[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] libxl: Allow multiple serial ports on HVM domain creation



On gio, 2014-07-31 at 00:24 +0000, White, Edmund H wrote:


> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index addacdb..0b83ed9 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -196,8 +196,26 @@ static char ** 
> libxl__build_device_model_args_old(libxl__gc *gc,
>          int nr_set_cpus = 0;
>          char *s;
>  
> -        if (b_info->u.hvm.serial) {
> -            flexarray_vappend(dm_args, "-serial", b_info->u.hvm.serial, 
> NULL);
> +        if (b_info->u.hvm.serial || b_info->u.hvm.serial_list) {
> +            if ( b_info->u.hvm.serial && b_info->u.hvm.serial_list )
> +            {
> +                LOG(ERROR, "%s: Both serial and serial_list set",
> +                    __func__);
>
Looking at LOG-->LIBXL_LOG's definition in tools/libxl/libxl_internal.h,
it looks like __func__ is already included in there, so I don't think
you need to include it explicitly.

> +                return NULL;
> +            }
> +            if (b_info->u.hvm.serial) {
> +                flexarray_vappend(dm_args,
> +                                  "-serial", b_info->u.hvm.serial, NULL);
> +            } else if (b_info->u.hvm.serial_list) {
> +                char **p;
> +                for (p = b_info->u.hvm.serial_list;
> +                     *p;
> +                     p++) {
>
Not a big deal, but, doesn't the for fit in one line (a matter of taste,
though, I guess, as I don't think libxl coding style forbids this).

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.