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

Re: [Xen-API] [Xen-devel] [PATCH 2 of 5 v4] tools/libxc: Helper function for XEN_SYSCTL_consoleringsize



On 13/03/13 12:52, Andrew Cooper wrote:
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Keir/Jan: Ping? This is a hypervisor change.

>
> ---
> Changes since v2:
>  * Tweak style and errno in case of invalid pointer.
>
> diff -r 89f3c6846f6b -r 0bd32c19873e tools/libxc/xc_misc.c
> --- a/tools/libxc/xc_misc.c
> +++ b/tools/libxc/xc_misc.c
> @@ -100,6 +100,26 @@ int xc_readconsolering(xc_interface *xch
>      return ret;
>  }
>  
> +int xc_consoleringsize(xc_interface *xch, uint64_t *psize)
> +{
> +    int ret = -1;
> +    DECLARE_SYSCTL;
> +
> +    if ( !psize )
> +    {
> +        errno = EINVAL;
> +        return ret;
> +    }
> +
> +    sysctl.cmd = XEN_SYSCTL_consoleringsize;
> +    ret = do_sysctl(xch, &sysctl);
> +
> +    if ( !ret )
> +        *psize = sysctl.u.consoleringsize.size;
> +
> +    return ret;
> +}
> +
>  int xc_send_debug_keys(xc_interface *xch, char *keys)
>  {
>      int ret, len = strlen(keys);
> diff -r 89f3c6846f6b -r 0bd32c19873e tools/libxc/xenctrl.h
> --- a/tools/libxc/xenctrl.h
> +++ b/tools/libxc/xenctrl.h
> @@ -998,6 +998,7 @@ int xc_readconsolering(xc_interface *xch
>                         char *buffer,
>                         unsigned int *pnr_chars,
>                         int clear, int incremental, uint32_t *pindex);
> +int xc_consoleringsize(xc_interface *xch, uint64_t *psize);
>  
>  int xc_send_debug_keys(xc_interface *xch, char *keys);
>  
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

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