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

Re: [Xen-API] [PATCH 3 of 5 v2] tools/libxc: Implement xc_readconsolering_buffer()



On Thu, 2013-02-21 at 15:46 +0000, Andrew Cooper wrote:
> Functions identically to xc_readconsolering(), but uses a user-provided
> xc_hypercall_buffer_t to save using a bounce buffer.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> --
> Changes since v1:
>  * Reduce xc_readconsolering() to use xc_readconsolering_buffer()
> 
> diff -r 1ffce9bf90f5 -r 1e6c7f7cec6f tools/libxc/xc_misc.c
> --- a/tools/libxc/xc_misc.c
> +++ b/tools/libxc/xc_misc.c
> @@ -70,13 +70,29 @@ int xc_readconsolering(xc_interface *xch
>                         int clear, int incremental, uint32_t *pindex)
>  {
>      int ret;
> -    unsigned int nr_chars = *pnr_chars;
> -    DECLARE_SYSCTL;
> -    DECLARE_HYPERCALL_BOUNCE(buffer, nr_chars, 
> XC_HYPERCALL_BUFFER_BOUNCE_OUT);
> +    DECLARE_HYPERCALL_BOUNCE(buffer, *pnr_chars, 
> XC_HYPERCALL_BUFFER_BOUNCE_OUT);

While you are hear this could really use a comment (in the header) that
*pnr_chars is both an input (buffer size) and an output. Same is true of
the new function I think?
[...]

> diff -r 1ffce9bf90f5 -r 1e6c7f7cec6f tools/libxc/xenctrl.h
> --- a/tools/libxc/xenctrl.h
> +++ b/tools/libxc/xenctrl.h
> @@ -998,6 +998,10 @@ int xc_readconsolering(xc_interface *xch
>                         char *buffer,
>                         unsigned int *pnr_chars,
>                         int clear, int incremental, uint32_t *pindex);
> +int xc_readconsolering_buffer(xc_interface *xch,
> +                              xc_hypercall_buffer_t *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-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®.