[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120316054556.GH3163@mwanda>
Date: Fri, 16 Mar 2012 08:45:56 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: "K. Y. Srinivasan" <kys@...rosoft.com>
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, virtualization@...ts.osdl.org,
ohering@...e.com, Alan Stern <stern@...land.harvard.edu>
Subject: Re: [PATCH 1/3] Drivers: hv: Support the newly introduced KVP
messages in the driver
On Thu, Mar 15, 2012 at 05:48:43PM -0700, K. Y. Srinivasan wrote:
> /*
> * The windows host expects the key/value pair to be encoded
> * in utf16.
> */
> keylen = utf8s_to_utf16s(key_name, strlen(key_name), UTF16_HOST_ENDIAN,
> - (wchar_t *) kvp_data->data.key,
> + (wchar_t *) kvp_data->key,
> HV_KVP_EXCHANGE_MAX_KEY_SIZE / 2);
> - kvp_data->data.key_size = 2*(keylen + 1); /* utf16 encoding */
> + kvp_data->key_size = 2*(keylen + 1); /* utf16 encoding */
> +
I feel like a jerk for asking this, but is the output length correct
here? It seems like we could go over again. Also utf8s_to_utf16s()
can return negative error codes, why do we ignore those?
regards,
dan carpenter
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists