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

Re: [Xen-devel] [PATCH 09/52] xen/arch/x86/hvm/viridian.c: let custom parameter parsing routines return errno



> -----Original Message-----
> From: Juergen Gross [mailto:jgross@xxxxxxxx]
> Sent: 09 August 2017 08:06
> To: xen-devel@xxxxxxxxxxxxx
> Cc: Juergen Gross <jgross@xxxxxxxx>; Paul Durrant
> <Paul.Durrant@xxxxxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>; Andrew
> Cooper <Andrew.Cooper3@xxxxxxxxxx>
> Subject: [PATCH 09/52] xen/arch/x86/hvm/viridian.c: let custom parameter
> parsing routines return errno
> 
> Modify the custom parameter parsing routines in:
> 
> xen/arch/x86/hvm/viridian.c
> 
> to indicate whether the parameter value was parsed successfully.
> 
> Cc: Paul Durrant <paul.durrant@xxxxxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  xen/arch/x86/hvm/viridian.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c
> index aa9b87c0ab..6f012bcb62 100644
> --- a/xen/arch/x86/hvm/viridian.c
> +++ b/xen/arch/x86/hvm/viridian.c
> @@ -1083,7 +1083,7 @@ static int viridian_load_vcpu_ctxt(struct domain *d,
> hvm_domain_context_t *h)
>  HVM_REGISTER_SAVE_RESTORE(VIRIDIAN_VCPU, viridian_save_vcpu_ctxt,
>                            viridian_load_vcpu_ctxt, 1, HVMSR_PER_VCPU);
> 
> -static void __init parse_viridian_version(char *arg)
> +static int __init parse_viridian_version(char *arg)
>  {
>      const char *t;
>      unsigned int n[3];
> @@ -1118,10 +1118,11 @@ static void __init parse_viridian_version(char
> *arg)
> 
>      printk("viridian-version = %#x,%#x,%#x\n",
>             viridian_major, viridian_minor, viridian_build);
> -    return;
> +    return 0;
> 
>   fail:
>      printk(XENLOG_WARNING "Invalid viridian-version, using default\n");
> +    return -EINVAL;
>  }
>  custom_param("viridian-version", parse_viridian_version);
> 
> --
> 2.12.3


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

 


Rackspace

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