2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

socket-util: error number to string for sockets.

For winsock2 functions, error number has to be converted to string
using FormatMessage().

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-02-05 19:50:10 -08:00
parent 55489d31a6
commit b26f46a401
3 changed files with 35 additions and 0 deletions

View File

@@ -323,6 +323,10 @@ ovs_retval_to_string(int retval)
: ovs_strerror(retval));
}
/* This function returns the string describing the error number in 'error'
* for POSIX platforms. For Windows, this function can be used for C library
* calls. For socket calls that are also used in Windows, use sock_strerror()
* instead. For WINAPI calls, look at ovs_lasterror_to_string(). */
const char *
ovs_strerror(int error)
{