[ovs-dev] [PATCH v2 2/3] socket-util: error number to string for sockets.

Ben Pfaff blp at nicira.com
Mon Feb 10 21:01:23 UTC 2014


On Mon, Feb 10, 2014 at 11:16:21AM -0800, Gurucharan Shetty wrote:
> For winsock2 functions, error number has to be converted to string
> using FormatMessage().
> 
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>

You can just include "ovs-thread.h", it shouldn't be necessary to
explicitly include <pthread.h>.

I'd make sock_strerror()'s return type "const char *".

I'd add a comment to sock_strerror() that explains why one would use
it instead of ovs_strerror(); it might be good to add a comment on
ovs_strerror(), too, explaining why you might need to use
sock_strerror() instead.

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list