On Tue, 2015-01-13 at 14:25 +, Julien Grall wrote:
> Flask code already provides an helper to copy a string from guest. In a later
"a helper".
> patch, the new DT hypercalls will need a similar function.
>
> To avoid code duplication, copy the flask helper (flask_copying_string) to
> common
>>> On 20.01.15 at 13:45, wrote:
> On 19/01/15 16:51, Jan Beulich wrote:
> On 13.01.15 at 15:25, wrote:
>>> +void *safe_copy_string_from_guest(XEN_GUEST_HANDLE(char) u_buf,
>>> + size_t size, size_t max_size)
>>
>> Is the "safe_" prefix really meaningful? I.e
Hi Jan,
On 19/01/15 16:51, Jan Beulich wrote:
On 13.01.15 at 15:25, wrote:
>> --- /dev/null
>> +++ b/xen/common/guestcopy.c
>> @@ -0,0 +1,30 @@
>> +#include
>> +#include
>> +#include
>> +#include
>> +
>> +/* The function copies a string from the guest and adds a NUL to
>> + * make sure t
>>> On 13.01.15 at 15:25, wrote:
> --- /dev/null
> +++ b/xen/common/guestcopy.c
> @@ -0,0 +1,30 @@
> +#include
> +#include
> +#include
> +#include
> +
> +/* The function copies a string from the guest and adds a NUL to
> + * make sure the string is correctly terminated.
> + */
Coding style.
On 01/13/2015 09:25 AM, Julien Grall wrote:
Flask code already provides an helper to copy a string from guest. In a later
patch, the new DT hypercalls will need a similar function.
To avoid code duplication, copy the flask helper (flask_copying_string) to
common code:
- Rename into safe_cop
Flask code already provides an helper to copy a string from guest. In a later
patch, the new DT hypercalls will need a similar function.
To avoid code duplication, copy the flask helper (flask_copying_string) to
common code:
- Rename into safe_copy_string_from_guest
- Add comment to explai